📝 Substitution Method

Like a whiteboard proof: Guess, then verify with induction

How Substitution Method Works

  1. Guess the form of the solution (e.g., O(n log n))
  2. Assume it holds for smaller values (Inductive Hypothesis)
  3. Substitute into the recurrence
  4. Prove it holds for n (find constants that work)
📌 Problem: Solve this recurrence
T(n) = 2T(n/2) + n
Our guess: T(n) = O(n log n)
✏️ Proof Walkthrough
Step 0 / 0
âś…
Proof Complete! We have shown T(n) = O(n log n)