Print all the nodes at a distance K from the given node

Can you please tell me what is wrong with my code. I am getting a wrong output

Hey @rahul.gupta03111999
Updated ur code and mentioned the changes in corrections : https://ide.codingblocks.com/s/350540

Also 2 testcase will still give WA because for each testcase u have to print numbers in sorted order for that store them in vector and then sort and print

Hey @rahul.gupta03111999
If this is resolved then please close it :slight_smile:

If you do not mind me asking, what do I need to close sir?

Mark this thread as resolved :slight_smile: