Whats the problem in this code, as it is not showing any output.
Print all nodes at distance k from target node
@aditi2512201012019 target should point to the node x which is present in tree already, do not make new node with value x.
https://ide.codingblocks.com/s/279064 , I have made the corresponding changes,but still I am getting 2 failed testcases.
Hey Aditi you have to print nodes value in sorted order!
so store the values in vector then sort and print them
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.