input: Write a function to find the maximum sum of an array of non-negative integers that does not exceed a given upper limit value.
  
  assert findMaxSum(10, [1, 3, 5, 4, 2, 6]) == 10
  assert findMaxSum(7, [3, 1, 2, 5, 4]) == 7
  assert findMaxSum(20, [1, 2, 3, 4]) == 10
  assert findMaxSum(5, [1, 1, 1, 2, 2, 3]) == 5
  assert findMaxSum(3, [1, 4, 2]) == 3
output: def findMaxSum(limit, nums):
      nums.sort(reverse=True)
      current_sum = 0
      for num in nums:
          if current_sum + num <= limit:
              current_sum += num
          if current_sum == limit:
              break
      return current_sum