Subset sum easy(some test cases failing)

I have approached this problem as follows:

  1. Find every possible subset with sum =0.
  2. If number of such subsets > 0 Print yes else print No,
    My code: https://ide.codingblocks.com/s/660982

I want to know what cases i am missing here and the problem with my code. Thanks for the help

hi @gaurarjun444,
try this test case

1
3
0 1 2

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.