

McqMate
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. |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet