Pregunta de entrevista de Amazon

sort an array by decreasing the time complexity