HCL Interview Question

How to sort the array.