input: Write a function to improve the following Python program to reduce its time complexity. The original function calculates the maximum sum of two distinct elements from the given array. The improved function should achieve the same result with reduced time complexity.
  
  ### 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 to be Implemented:
  def find_max_sum(arr):
      max_sum = 0
      left = 0
      right = len(arr) - 1
      while left < right:
          if arr[left] + arr[right] > max_sum:
              max_sum = arr[left] + arr[right]
          if arr[left] > arr[right]:
              right -= 1
          else:
              left += 1
      return max_sum
  
  ### Test Cases:
  assert find_max_sum([1, 2, 3, 4, 5]) == 9
  assert find_max_sum([10, 20, 30, 40, 50]) == 90
  assert find_max_sum([5, 10, 15, 20, 25]) == 45
  assert find_max_sum([1, 1, 1, 1, 1]) == 2
  assert find_max_sum([100, 10, 1000, 10000]) == 11000
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