Sort a stack using another stack

In this article, we have explored an algorithm to sort a stack using another stack that is by using stack operations like push and pop only. The time complexity of this approach is O(N^2) and space complexity is O(N).


This is a companion discussion topic for the original entry at http://iq.opengenus.org/sort-stack-using-stack/