Recursion
Watch the call stack grow, shrink, and finally make sense.
Recursion progress0 / 8
- Recursion BasicsA function that solves a smaller copy of itself.5m
- The Call StackEvery pending call waits its turn on a stack of frames.5m
- Factorial and FibonacciOne call per step, or two calls that redo everything.6m
- MemoizationWrite each answer down once, never solve it twice.5m
- BacktrackingChoose, explore, then undo the choice and try the next.6m
- Return Up or Pass DownEvery recursion moves information one of two ways. Pick one.6m
- Tail Calls and LoopsWhen nothing happens after the call, the frame is dead weight.6m
- Your Own Call StackNot a tail call? Then carry the stack yourself.6m
Quiz yourself: 3 questions from this module
1 / 3