ParseHub interview question

Reverse array in linear time and constant space. Then asked to do some modifications.