Print all nodes at a distance k from a given node

failing 2 test cases

Hello @i_am_dekard_shaw,

Your output should be in a sorted order:
Example:
9
1 20 8 4 2 12 10 14 22
2 4 8 10 12 14 20 22 1
1
8 2
Your Output:
2 10 14 22 1

Hope, this would help.
Give a like if you are satisfied.

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.