2. Solving recurrences
Expanding the recurrence into a tree
Summing the cost at each level
Applying the substitution method
3. The substitution method consists of
two steps-
Guess the form of the solution
Use mathematical induction to find constants
and show that the solution works.
We use recursion tree to generate a good guess
and then we can prove it by substitution
method.