Q1. What is the Virtual DOM and how does React use reconciliation?
The Virtual DOM is a lightweight JavaScript representation of the real DOM. When state or props change React creates a new Virtual DOM tree, diffs it against the previous one using a reconciliation algorithm (Fiber), and computes the minimum set of real DOM operations needed. This diffing assumes elements of the same type produce similar trees and uses keys to match list items. Reconciliation makes React fast by batching DOM updates and avoiding expensive full re-renders.