input: 
  def findMaxSum(limit: int, array: List[int]) -> int:
      """
      Given an array of non-negative integers and an upper limit value, this function finds the maximum sum of elements in the array that does not exceed the limit.
      >>> findMaxSum(10, [1, 3, 5, 4, 2, 6])
      10
      >>> findMaxSum(8, [1, 3, 5, 4, 2, 6])
      8
      """
      maxSum = 0
      for i in range(len(array)):
          currentSum = 0
          for j in range(i, len(array)):
              currentSum += array[j]
              if currentSum <= limit and currentSum > maxSum:
                  maxSum = currentSum
      return maxSum
  
output:     maxSum = 0
      for i in range(len(array)):
          currentSum = 0
          for j in range(i, len(array)):
              currentSum += array[j]
              if currentSum <= limit and currentSum > maxSum:
                  maxSum = currentSum
      return maxSum