What will be the time complexity of the code to reverse stack recursively?
|B.||o(n log n)|
|Answer» D. o(n2)|
|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).|
Login to Continue
It will take less than 2 minutes