please add required changes or reference a code i am stuck on this code.
Not getting correct output
@shubhamgh00 https://www.geeksforgeeks.org/print-nodes-distance-k-given-node-binary-tree/
you can refer to this code for this question. This is most detailed explanation of this question I have read till date.
Hope this helps.
I used this code to understand but i am not able to find target node when it is input in for of int.
How can i find target node??
You don’t have to find the target node,you have to input a distance and all the nodes at the distance k will get printed.
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.