Pergunta de entrevista da empresa Google

Arrange array in reverse but their was a trick