The problem is named: Subset Sum easy.
my Solution:
Approach: to calculate all the subset sums by traversing through the array, and which is easy, given the small value of N in the problem. At each step we have 2 options, either we take the Ith element or move ahead without taking it. in the right most corner of the recursive tree, there will be a case where we have not taken any element from the array and thus the value will be equal to the value that we are passing, i.e 0. So, this case will always be present. We want atleast one more case with sum of subset after traversing the array=0. We have used a counter for checking this.
Please help in why the code is not working.