Optum Interview Question

sorting array and ways to do it