Question Description
(This question is a variation of the LeetCode question 39. Combination Sum. If you haven't completed that question yet, it is recommended to solve it first.)
Given a list of positive integers and a target number k, write a function that returns true if there exists a subset of nums that adds up to k, and false otherwise. Note that numbers can appear more than once in the list.
Constraints:
- 1 <= nums.length <= 1000
- 1 <= nums[i] <=
- 1 <= k <=
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected