Pregunta de entrevista de Google

Easy first question - Sort array only in odd places