Reverse a Stack using java

 Approach: 

To reverse a stack in java we use simple recursion in which 
     1. our first step will be to pop out the elements from the stack

     2. Traverse through the end of the stack

     3. Add the pop data at the end of the stack each time




  

Comments