Pregunta de entrevista de Discover

Sort an array between some positions