lesson · cs-101 · week 3in progressRecursion
A function that calls itself to break a problem down. It keeps shrinking the input until it hits a stopping point, then unwinds back to the answer.
- Base case — the input is small enough to answer directly.
- Recursive case — call yourself with a smaller input.