Accenture interview question

Reverse an array