I can't able to find the target node


this is my code.
i am not able to make a function which can find target node successfuly . its getting a little bit confussing .

you can refer to this code


idea is to create 2 functions:

1)to print nodes k down from a given node
2)get a list of nodes from root to target

rest you can refer from code

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.