input: Write a function to improve the time complexity of the given Python program. The original function finds the maximum sum of any two distinct elements in an array. The modified function should achieve this with a reduced time complexity.
  assert find_max_sum([2, 4, 6, 8])==14
  assert find_max_sum([1, 3, 5, 2])==8
  assert find_max_sum([10, 15, 5, 3])==25
  assert find_max_sum([0, 0, 0, 0])==0
  assert find_max_sum([-1, -2, -3, -4])==-3
output: def find_max_sum(arr):
      if len(arr) < 2:
          return 0
      max1, max2 = float('-inf'), float('-inf')
      for num in arr:
          if num > max1:
              max2 = max1
              max1 = num
          elif num > max2 and num != max1:
              max2 = num
      return max1 + max2