Sorting only with stack methods