little strokes fell great oaks.
Backpack with Value array: note that: "A number in the array can be used multiple times in the combination." function: dp[i] += dp[i - nums[j - 1]]; (when you take that ith item) or dp[i] = 0; (when you don't take that ith item)
No comments:
Post a Comment