Unroll [a recursive function]
as an explicit call tree for
a small input: every call, its
arguments, its return, in
order. Then the iterative
version.
See a Recursion Unrolled
Jun 10, 2026
The call tree drawn out, then the iterative twin.
Prompt
Show me [a recursive function] unrolled as an explicit call tree for a small input — every call, its arguments, what it returns, and in what order. Then show the same thing written iteratively.
Use this prompt