Recursion Practice
Practice base cases, call traces, and recursive decomposition.
Recommended resources
- MIT 6.100L Introduction to CS and Programming using Python — MIT OpenCourseWare
Instructions
- Write the base case before the recursive step.
- Trace one nontrivial input by hand.
Ordered items
- Recursive power finger exercise
- Recursive binary search
- Recursively flatten nested lists
- Recursive flattening finger exercise
Completion
Implement each recursive function without slicing or hidden global state.