I'm not getting the logic

I tried to code this question using an answer vector to store the combination whenever it reaches the target value. If it is greater than the target value I clear that combination.
code-https://ide.codingblocks.com/s/325210

hello @amanb25 i have made a lot of changes in your code and now it is executing and giving correct answer.


please try to understand your faults.
i hope i have cleared your doubt .
Happy Learning !!

1 Like