Rakuten interview question

Reverse an array in place.