input: Write a python function to reverse an array in place.
  assert reverse_array([1, 2, 3]) == [3, 2, 1]
  assert reverse_array([4, 5, 6, 7]) == [7, 6, 5, 4]
  assert reverse_array([1, 2, 3, 4, 5]) == [5, 4, 3, 2, 1]
output: def reverse_array(arr):
      left, right = 0, len(arr) - 1
      while left < right:
          arr[left], arr[right] = arr[right], arr[left]
          left += 1
          right -= 1
      return arr