Cant find error in the code

cant find error in the code

Please send your code id, paste your code on coding blocks ide and after saving the code, send the generated link.

Your code is a little complicated. You can see my implementation, I had also commented on the part you need to focus on and grasp BFS.

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.