Pregunta de entrevista de Microsoft

Sorting an array that is already k-sorted