Morgan Stanley Interview Question

Reverse the array