Skip to content

Recursion

Watch the call stack grow, shrink, and finally make sense.

Start the module

1. Recursion Basics · 5 min

0 of 8 lessons · 0% complete

Start module

Recursion visualizer

Every lesson in this module opens with an animation you can step through. This is the first one — Recursion Basics: A function that solves a smaller copy of itself.

Recursion Basics

Step 1 of 9

A recursive function needs two parts: a base case that answers directly, and a step that makes the problem smaller.

Lessons
8
Minutes
45
Problems
14
Concepts
7

Quiz yourself: 3 questions from this module

1 / 3

What keeps a recursive function from running forever?