Logic behind implementing a Sorted Stack without using any other datastructure..
- by RBA
What could be the logic involved in Sorting a stack in increasing order Without using the any other data-Structure.
I feel it could be done, using Recursion. But the question is how? Can Anybody please share the logic/algorithm for the same.
Thanks.