Amazon interview question

asked to write the programs on sorting