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 the array is empty then return 0.
  assert findMaxSum(10, [1, 3, 5, 4, 2, 6])==10
  assert findMaxSum(20, [8, 7, 2, 10, 5])==20
  assert findMaxSum(15, [1, 2, 3, 4, 5, 6])==15
  assert findMaxSum(5, [6, 7, 8, 9])==0
  assert findMaxSum(0, [0, 0, 0, 0])==0
  assert findMaxSum(0, [])==0
output: def findMaxSum(upper_limit, arr):
      if not arr:
          return 0
      dp = [0] * (upper_limit + 1)
      for num in arr:
          for i in range(upper_limit, num - 1, -1):
              dp[i] = max(dp[i], dp[i - num] + num)
      return dp[upper_limit]