RecursionFunction call stack · divide & conquer
active callreturnedwaiting
factorial(5)→ 120
└factorial(4)…
└factorial(3)…
└factorial(2)…
└factorial(1)…
Call stack depth (max)
0frames
Recursion: Factorial and Fibonacci
CSC-211 · Semester III · Data Structures and Algorithms
Call stack depth (max)
0frames