Why am I not getting answer . please check the code
Nodes At a distance K in binary Tree
Please resolve this doubt
@ashwani225 you have to also take into consideration whether you can include current node with the answers from left/right sub trees.
in this tree answer is 58 (50+(-2)+10)
but when node -2 sends it to root 1, we cannot do (1+58) as this is invalid.
Try thinking to tackle it.
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.
