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)
πŸ’¬ Discuss
βœ… Correct Answer: (C) o(n)
Explanation: the recursive program to reverse stack uses memory of the order n to store function call stack.

Explanation by: Mr. Dubey
the recursive program to reverse stack uses memory of the order n to store function call stack.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
116
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate