input: Write a function to find the maximum sum of an array of non-negative integers, given an upper limit value. If the sum exceeds the limit, it should not be considered. If all elements in the array are greater than the limit, return 0.
  assert findMaxSum(10, [1, 3, 5, 4, 2, 6])==9
  assert findMaxSum(15, [5, 2, 7, 3, 8])==15
  assert findMaxSum(8, [1, 5, 3, 2])==6
  assert findMaxSum(0, [1, 3, 5, 4, 2, 6])==0
  assert findMaxSum(10, [12, 15, 11])==0
output: def findMaxSum(limit, arr):
      max_sum = 0
      current_sum = 0
      for num in arr:
          if num > limit:
              continue
          if current_sum + num <= limit:
              current_sum += num
              if current_sum > max_sum:
                  max_sum = current_sum
          else:
              current_sum = num
              if current_sum > max_sum:
                  max_sum = current_sum
      return max_sum