Agoda Interview Question

Write an algorithm to reverse an array