Check Subset Sum Problem
Check Subset Sum Problem — ExecCode Medium DSA Practice
Solve the Check Subset Sum problem on ExecCode. Free online medium DSA practice in DP. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description A decision process has repeated smaller choices. In Check Subset Sum, the best answer comes from comparing possibilities and reusing previous results. nums: array; target: goal sum (stdin: N target then values). Return YES or NO.
Examples
Input {"nums": [3, 34, 4, 12, 5, 2], "target": 9}; Output YES. Input {"nums": [1, 5, 5, 10], "target": 11}; Output YES. Input {"nums": [1, 2, 3], "target": 6}; Output YES
Constraints
1 <= len(nums) <= 200
Practice Check Subset Sum free on ExecCode. Browse DSA problems, topic map, and placement guides.