Code of this problem

can you please give code of this problem as i am facing issue in how to apply loop for x as we can iterate over neighbour so is nbs of src are only option for x …
So please give code for better clarity

hi @himanshuanand729, refer

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.

I am getting different answer in different compiler somewhere1 and 0 is there any problem in some initialization

On the code I gave? @himanshuanand729

yes
I understood the code but not able to figure out what is the problem