Qualcomm interview question

An array and asked me to sort it