Walmart interview question

Sort a Java Stack without recursion