Update SortStack.java

A stack is given which supports the following methods. Push, pop, peek and isEmpty. Sort this stack irrespective of its inner structure.
Solution

We will recursively pop the stack till it is empty, Then we will try to put the popped number with another recursive function named insertSorted. This will push to the stack if the top of the stack is greater than the number, if it is not, then it will pop the number and call the insertSorted with the popped number and the rest of the stack. After it returns it will push the number in correct place.