Recursion
Practice base cases, call traces, and recursive decomposition.
Use https://mlprep.iwase.dev/practice/programming/recursion/. This is a Practice set, not a Screening result. If window.mlPrepAgent is available, read local attempt history before planning. Help me work through the set without revealing full answers first, and save each real attempt through the bridge with recorded_by agent and agent_session_id when available.Recommended resources
- MIT 6.100L Introduction to CS and Programming using Python — MIT OpenCourseWare
- LeetCode Problem Set — LeetCode
Instructions
- Write the base case before the recursive step.
- Trace one nontrivial input by hand.
Ordered items
- —
- —
- —
Completion
Implement each recursive function without slicing or hidden global state.