input: Write a function to find the maximum element in a given array of numbers. If the array is empty, the function should return None.
  assert find_max_element([1, 43, 78, 3, 92, 42])==92
  assert find_max_element([5, 9, 2, 7, 10, 3])==10
  assert find_max_element([4, 3, 2, 1])==4
  assert find_max_element([7])==7
  assert find_max_element([])==None
output: def find_max_element(arr):
      if not arr:
          return None
      max_element = arr[0]
      for num in arr:
          if num > max_element:
              max_element = num
      return max_element