Dell Technologies Interview Question

Write the logic to Reverse an array