input: def findMaxSum(limit: int, array: List[int]) -> int:
      """
      Given an array of non-negative integers and an upper limit value, find the maximum sum of any contiguous subarray that does not exceed the given limit.
      
      >>> findMaxSum(10, [1, 3, 5, 4, 2, 6])
      10
      >>> findMaxSum(8, [1, 3, 5, 4, 2, 6])
      8
      >>> findMaxSum(20, [1, 3, 5, 4, 2, 6])
      21
      """
output:     max_sum = 0
      current_sum = 0
      start = 0
      
      for end in range(len(array)):
          current_sum += array[end]
          
          while current_sum > limit:
              current_sum -= array[start]
              start += 1
          
          max_sum = max(max_sum, current_sum)
      
      return max_sum