Infosys interview question

How to sort a stack ?