input: Write a function to find the maximum sum of any contiguous subarray such that the sum is less than or equal to a given limit.
  assert findMaxSum(10, [1, 2, 3, 4, 5]) == 10
  assert findMaxSum(15, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 15
  assert findMaxSum(5, [4, 2, 1, 7]) == 5
  assert findMaxSum(6, [3, 3, 9, 1, 2]) == 6
output: def findMaxSum(limit, nums):
      max_sum = 0
      current_sum = 0
      start = 0
  
      for end in range(len(nums)):
          current_sum += nums[end]
          
          while current_sum > limit and start <= end:
              current_sum -= nums[start]
              start += 1
              
          max_sum = max(max_sum, current_sum)
          
      return max_sum