input: Write a function to improve the following Python program to reduce its time complexity. The original function calculates the maximum sum of any two distinct elements in the array by iterating through all possible pairs of elements. The improved function should achieve the same result with a more efficient approach.
  
  ### Original Function:
  def find_max_sum(arr):
      max_sum = 0
      for i in range(len(arr)):
          for j in range(i+1, len(arr)): 
              max_sum = max(max_sum, arr[i] + arr[j])
      return max_sum
  
  ### Improved Function:
  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:
              max2 = num
      return max1 + max2
  
  ### Assert Test Cases:
  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, 1, 1, 1]) == 2
  assert find_max_sum([10, 20, 30, 40, 50]) == 90
  assert find_max_sum([]) == 0
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:
              max2 = num
      return max1 + max2