Completed SortStack.java