Print all nodes at distance k from a given node

I am not able to find out the reason that why one testcase is not getting passed… Please help me to find that out

the link to code is :-

@krikhi you have to Print 0 if no such node exist at distance k.

thanks a lot! All the testcases are getting passed

1 Like