SyntaxFix
Write A Post
Hire A Developer
Questions
The usual DP solution is true for the problem.
One optimization you may do, is to keep a count of how many solutions exist for the particular sum rather than the actual sets that make up that sum...