what will be the space and time complexity of reversing a stack using recursion, since here we are using two recursive functions so i m bit confused so please explain in detail
What will be the time and space complexity?
O( N )
is the space complexity
for time
i thing that i will be
O( N ^ 2 ) bcz of the insert at bottom function