Subset sum easy

please help me with my code

Hi neerav
For each element of array, you need to make two recursion calls one with sum included and other with sum excluded.
Corrected Code : https://ide.codingblocks.com/s/153479

Hope it helps
Mark resolved if satisfied :slight_smile:

and also print Yes and No in final ans instead of 1 and 0.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

help???

I assume you have seen the corrected code. Are you stil facing any problem?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.