input: Write a function to find the maximum element in a given array of numbers. If the given array is empty then return None. The function should not use any built-in max() function.
  assert find_max_element([1, 43, 78, 3, 92, 42])==92
  assert find_max_element([1, 3, 4, 5])==5
  assert find_max_element([-1, -4, -5, -6])==-1
  assert find_max_element([2])==2
  assert find_max_element([])==None
output: def find_max_element(arr):
      if not arr:
          return None
      max_val = arr[0]
      for num in arr:
          if num > max_val:
              max_val = num
      return max_val