Given an array of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum.
- Time : O(nsum)
- Space : O(sum)
1 | class Solution { |
Given an array of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum.
1 | class Solution { |