Booz Allen Hamilton interview question

write an algorithm to reverse an array