input: Write a function to find the maximum element in the given array. If the array is empty, then return None.
  assert find_max_element([1, 10, 50, 3, 8])==50
  assert find_max_element([5, 8, 12, 3, 1])==12
  assert find_max_element([-1, -5, -3, -7, -2])==-1
  assert find_max_element([])==None
  assert find_max_element([42])==42
output: def find_max_element(arr):
      if not arr:
          return None
      return max(arr)