What is the aaproch

sir do we need to do inplace format or we should use one another stack too or by using two stacks
there are many ways how we are supposed to use this questin using recurison

Hi @pankajsingh
Algo

  1. First Empty your stack into another helper Stack.
  2. Then Using Recursion copy element from helper to stack.
  3. Till the Stack is reversed.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.