Explanation: the recurrence relation for the recursive code to reverse stack will be given by-t(n)=t(n-1)+n.this is calculated to be equal to o(n2).
Q. What will be the time complexity of the code to reverse stack recursively?
β
Correct Answer: (D)
o(n2)
Explanation by: Mr. Dubey
the recurrence relation for the recursive code to reverse stack will be given by-t(n)=t(n-1)+n.this is calculated to be equal to o(n2).
Discussion
Question Analytics
772
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
92%
Success Rate