Call stacks that grow and unwind before your eyes — Hanoi, factorial, and beyond.
4 visualizations
Computes n! by recursion, showing the call stack winding up to the base case and unwinding with results.
Moves a stack of disks between pegs one at a time, never placing a larger disk on a smaller one.
Computes fib(n) = fib(n−1) + fib(n−2) directly by recursion — simple, but exponential because subproblems are solved again and again.
Generates every subset of a set by recursively branching into 'include this element' and 'exclude it' at each position.