GATE | GATE-CS-2005 | Question 81
Consider the following C-function:
The space complexity of the above function is:
Explanation: Note that the function foo() is recursive. Space complexity is O(n) as there can be at most O(n) active functions (function call frames) at a time.
Quiz of this Question