input: def find_max_element(arr: List[int]) -> int:
      """ Find the maximum element in the given array.
      >>> find_max_element([1, 10, 50, 3, 8])
      50
      """
  
output:     if not arr:
          return None
      max_element = arr[0]
      for num in arr:
          if num > max_element:
              max_element = num
      return max_element