🔁 Recursion Visualization
USACO C++ Book · Interactive Visualizer
🔄 Recursive Call Stack — factorial(4) Full Demo
Recursion
Call Stack
Step 0/9
📊 Call Stack — each recursive call pushes a frame
🗂 Execution State
Current Call
Return Value
Stack Depth
Time:
O(N)
Space:
O(N)
(stack depth)
💻 Code
Hint
Click
Next Step ▶
to start and observe how recursive calls push onto the stack (unwind phase) and pop off (backtrack phase).
◀ Prev
Next Step ▶
↺ Reset
0/9
Keyboard:
→
Next
←
Prev
R
Reset