Recursionhard
0:00.0

A tail-recursive function computes f(n,acc)={accif n=0f(n1,accn)otherwisef(n, acc) = \begin{cases} acc & \text{if } n = 0 \\ f(n-1, acc \cdot n) & \text{otherwise} \end{cases} with initial call f(n,1)f(n, 1). How does the stack depth (call depth) scale with nn when the compiler does NOT perform tail-call optimization, and how does it scale when the compiler DOES?