RecursionFunction call stack · divide & conquer
active callreturnedwaiting
fib(5)→ 5
└fib(4)…
└fib(3)…
└fib(2)…
└fib(1)…
└fib(0)…
└fib(1)…
└fib(2)…
└fib(1)…
└fib(0)…
└fib(3)…
└fib(2)…
└fib(1)…
└fib(0)…
└fib(1)…
Call stack depth (max)
0frames
Recurrence and Fibonacci Sandbox
CSC-325 · Semester V · Design and Analysis of Algorithms
Call stack depth (max)
0frames