input: Write a function to improve the given Python program by reducing its time complexity. The original function finds the maximum sum of any two distinct elements in a given array.
  assert find_max_sum([1, 2, 3, 4, 5])==9
  assert find_max_sum([5, 4, 3, 2, 1])==9
  assert find_max_sum([1, 3, 5, 2, 4])==9
  assert find_max_sum([1, 1, 1, 1])==2
  assert find_max_sum([10, 20, 30, 40])==70
output: def find_max_sum(arr):
      if len(arr) < 2:
          return 0
      first_max = max(arr[0], arr[1])
      second_max = min(arr[0], arr[1])
      for num in arr[2:]:
          if num > first_max:
              second_max = first_max
              first_max = num
          elif num > second_max:
              second_max = num
      return first_max + second_max