question= https://hack.codingblocks.com/contests/c/443/507
answer = https://ide.codingblocks.com/#/s/17549
Last test case failing
aayush you only have to check sum ==key when u arrive at leaf node .this is the error
i didn’t understood what you said. i am storing the required answer in a vector and printing it if vector sum is equal to the required sum.
ok i have modified your code and commented the problem
https://ide.codingblocks.com/#/s/17631
if any problem reply
HAPPY CODING!
1 Like
thank you for the help