Sum of the nodes

I’m getting error in my code.In my code I’m trying to ignore true and false values given in the question.

this not correct
if you ignore true false your code will not able to build the tree properly

you can check this code

if you have any further doubt in this
feel free to ask

I gave the input in the same way but got different answer


link of my code

after line 20
you forgot to take input
cin>>left;

now you code will also give correct output

can i mark your doubt as resolved now??

hi @dips123deepali_c25f140838182212
as i can see you have completed this question and got 100 points
so now kindly give your feedback asap, it hardly takes a min

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.