All topics / Recursion, Finally

Recursion, Finally

The mental model that makes recursion stop being scary: a base case, a step toward it, and trust — plus when it blows the stack and how to avoid it.

  1. The mental model: stop, shrink, trust
  2. Writing recursion that works
  3. When it breaks: the stack, and when to use a loop instead