input: Write a function to find the length of the largest subarray with the maximum sum.
  assert largestSubarray([1, -2, 3, 4, -1, 2, 1, -5, 4])==7
  assert largestSubarray([-2, -3, 4, -1, -2, 1, 5, -3])==4
  assert largestSubarray([1, 2, 3, -2, 5])==5
output: def largestSubarray(arr):
      max_sum = current_sum = arr[0]
      max_len = current_len = 1
      for i in range(1, len(arr)):
          if current_sum + arr[i] > arr[i]:
              current_sum += arr[i]
              current_len += 1
          else:
              current_sum = arr[i]
              current_len = 1
          if current_sum > max_sum:
              max_sum = current_sum
              max_len = current_len
          elif current_sum == max_sum:
              max_len = max(max_len, current_len)
      return max_len