Domanda di colloquio di Google

Arrange array in reverse but their was a trick