Print all nodes at a distance k from a given node

i am not able to form the code for this problem.
pls tell the correct code.

@yutikakhanna


Please close this doubt

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.

this code is showing many errors…pls tell the correct code

https://hack.codingblocks.com/app/contests/1151/350/problem
when i submit the code given by my fellow TA
i am not facing any issue all test case pass.
What is the issue that u are facing?

thanks the code is running now