How Recursion Works
Recursion is a function calling itself. Each call pushes a new frame onto a structure called the call stack — a stack means whatever gets pushed last comes back off first. Once it reaches a base case that stops the recursion, the calls return one by one, computing the result on the way back. In this example, a function called factorial computes a factorial by calling itself.
Computing factorial(3), what's the maximum depth the call stack reaches?