one test case not passed
https://ide.codingblocks.com/s/53905
Subset sum easy 15667
Hey Aastha, your code is not working for all the cases. For eg. check for this one
input:
1
4
12 8 -3 -5
your code’s output:
No
but the expected output is :
Yes
sample test case passed but other cases are not passed
Hi Aastha, consider the following case:
2
4
0 0 0 0
4
1 1 1 1
The expected output is:
Yes
No
Your code’s output:
Yes
Yes
Hey Aastha, your subset() is not correct, here I am sharing the code for subset() you can refer this
1 Like
https://ide.codingblocks.com/s/66733
here is my code.
All the above test cases are running correct when number of test cases is 1.
But it is failing for multiple test cases.
Kindly tell where i am wrong.
Try clearing the sarr Array and resetting the value of k before running every test case
**wow it was impressive!!**