Booz Allen Hamilton Interview Question

write an algorithm to reverse an array