Hexaware Technologies Interview Question

To sort the given array was one of my technical question