HCL interview question

How to sort the array.