input: Write a function to improve the time complexity of the given Python program that finds the maximum sum of any two distinct elements in an array. If the array is empty or has only one element, return 0.
  assert find_max_sum([3, 4, 6, 2])==10
  assert find_max_sum([1, 2])==3
  assert find_max_sum([5, 3, 2, 1])==8
  assert find_max_sum([])==0
  assert find_max_sum([7])==0
output: def find_max_sum(arr):
      if len(arr) < 2:
          return 0
      first_max = max(arr)
      arr.remove(first_max)
      second_max = max(arr)
      return first_max + second_max