Infosys Interview Question

Sort an array