Please check my code

Please have a look into my code and rectify the errors.

@kodivine0 output must be in sorted format, so don’t print nodes directly, instead store them in a vector, then sort and print!

sir, i have made the correction but still 1 test case is failing.

@kodivine0 share your code saved on ide.codingblocks.com

https://ide.codingblocks.com/s/304540 here is the code.

you have to print 0 when there is no node at distance k (or i==0)