Pregunta de entrevista de Huawei Technologies

How to reverse a given array?