input: Write a function to find the maximum element in a given array. The function should take a list of integers as input and return the largest integer in the list. If the list is empty, it should return None.
  assert find_max_element([1, 10, 50, 3, 8])==50
  assert find_max_element([-1, -5, -10])==-1
  assert find_max_element([42])==42
  assert find_max_element([10, 20, 30, 40, 50])==50
  assert find_max_element([])==None
output: def find_max_element(arr):
      if not arr:
          return None
      return max(arr)