Subset Sum eazy

Code - https://ide.codingblocks.com/s/39582
Ques - https://hack.codingblocks.com/contests/c/512/136
It’s working for every target element or subset sum to find in the array, leaving zero only. Can anyone correct my code?

Hey Mukul, the ques is for checking if the sum can be 0 or not only. And your approach is not correct. If you want to do it recursively, then generate all the subsets and chk if any subset’s sum is zero. Otherwise you can think its bit masking solution also, that will be much easier and efficient.

Hey, I don’t know how to do that . .so i used this simple approach, can u show the solution, using recursion only.

Hey Mukul, I’m sharing my code with you… You can refer this Subset sum easy code.