Agoda interview question

Write an algorithm to reverse an array