getting one test case wrong
Https://ide.codingblocks.com/s/195057 subset sum to target
@Faizan-Ali-1395131367301898
hello faizan.
I think u misunderstood the problem.u r are checking only contiguos subarray. but actually
we need to check whether there exist any subset whose sum is equal to the target .
for example if array is 2 8 2 and target is 4 then 2+ 2 can make 4 but ur logic will print no
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.