Pregunta de entrevista de Mojoreads

Q. Basic coding question on array and sorting.