input: Write a function to find the maximum sum of an array of non-negative integers given an upper limit value. If the array is empty, return 0. Consider only sums that do not exceed the limit.
  assert findMaxSum(10, [1, 3, 5, 4, 2, 6])==9
  assert findMaxSum(10, [2, 2, 2, 2])==8
  assert findMaxSum(5, [1, 2, 3, 4])==5
  assert findMaxSum(100, [])==0
  assert findMaxSum(10, [1, 11, 1, 1, 1])==4
output: def findMaxSum(limit, arr):
      arr.sort(reverse=True)
      current_sum = 0
      for num in arr:
          if current_sum + num <= limit:
              current_sum += num
          else:
              break
      return current_sum