Recursion

Practice base cases, call traces, and recursive decomposition.

Recommended resources

Instructions

  1. Write the base case before the recursive step.
  2. Trace one nontrivial input by hand.

Ordered items

  1. Recursive power finger exerciseRecursion · Easy · 7 min · External
  2. Recursive flattening finger exerciseRecursion · Medium · 10 min · External
  3. Number of IslandsData Structures · Medium · 25 min · External

Completion

Implement each recursive function without slicing or hidden global state.