Morgan Stanley interview question

Reverse the array