Subset sum easy

CODE LINK : https://pastebin.com/6c7afKTg
help me correct my mistake as I am unable to stop recursion after getting one ans

Hello @Divya_321

To stop recursion, you can start returning true after you get one ans, like I did in the below code in line 13 and line 17


But even this code won’t be correct

You need to count the number of elements included in the subset so that you don’t print “Yes” even if the subset is empty (as required by the question)
Here is the correct modified code

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.