input: Write a python function to find the maximum element in an array.
  assert findMax([1, 2, 3, 4, 5], 5) == 5
  assert findMax([10, 3, 4, 6, 7], 5) == 10
  assert findMax([-1, -5, -3, -4, -2], 5) == -1
output: def findMax(arr, n):
      max_element = arr[0]
      for i in range(1, n):
          if arr[i] > max_element:
              max_element = arr[i]
      return max_element