1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. What is the space complexity of program ...
Q.

What is the space complexity of program to reverse stack recursively?

A. o(1)
B. o(log n)
C. o(n)
D. o(n log n)
Answer» C. o(n)
Explanation: the recursive program to reverse stack uses memory of the order n to store function call stack.

Discussion