Sort a stack in ascending order with one buf stack