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