input: Write a python function to find the maximum element in an array of integers.
  assert findMax([3, 17, 5, 19, 10]) == 19
  assert findMax([1, 2, 3, 4, 5]) == 5
  assert findMax([5, 4, 3, 2, 1]) == 5
  assert findMax([-10, -20, -30, -5, -1]) == -1
output: def findMax(arr):
      if not arr:
          return None
      max_element = arr[0]
      for num in arr:
          if num > max_element:
              max_element = num
      return max_element