input: Write a python function to determine if a subset with a given sum exists using dynamic programming.
  assert subset_sum([1, 2, 3, 7], 6) == True
  assert subset_sum([1, 2, 7, 1, 5], 10) == True
  assert subset_sum([1, 3, 4, 8], 6) == False
output: def subset_sum(nums, target):
      n = len(nums)
      dp = [[False] * (target + 1) for _ in range(n + 1)]
  
      for i in range(n + 1):
          dp[i][0] = True
  
      for i in range(1, n + 1):
          for j in range(1, target + 1):
              if nums[i - 1] <= j:
                  dp[i][j] = dp[i - 1][j] or dp[i - 1][j - nums[i - 1]]
              else:
                  dp[i][j] = dp[i - 1][j]
  
      return dp[n][target]