Alternative solution to the problem sum_it_up

I was thinking of an alternate solution to the problem sum_it_up ( which asks us to find the subsets of an array which sums up to a particular element ), which follows the approach of the 0-1 knapsack problem. But It is not working properly and I am not getting where I am going wrong. The code can be found at https://ide.codingblocks.com/s/266211

Thank you very much for pointing out the mistake

1 Like