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. If no sum is possible that is less than or equal to the limit, return 0.
  assert findMaxSum(10, [1, 3, 5, 4, 2, 6])==10
  assert findMaxSum(8, [1, 3, 5, 4, 2, 6])==8
  assert findMaxSum(2, [1, 3, 5, 4, 2, 6])==2
  assert findMaxSum(0, [1, 3, 5, 4, 2, 6])==0
  assert findMaxSum(10, [])==0
output: def findMaxSum(limit, arr):
      dp = [0] * (limit + 1)
      for num in arr:
          for i in range(limit, num - 1, -1):
              dp[i] = max(dp[i], dp[i - num] + num)
      return dp[limit]