How can I approach this problem?

How can I approach this problem. Do I have to read Dijkstra before?

@aditya001tomar hey as graph is unweighted you can solve it with bfs also,ap graph ko as tree visualise kro to suppose source node is root of tree aur apko destination pr jana hai so jo bhi uske neighbours hai src node ke use root ke children assume kro and queue me push kro with level =1+root->level aise hi ab har child ke lie krna hai and jha bhi apko destination node mile bs uska level return krdena hai kyunki yhi level shortest hoga or its a shortest path btwn src and destination.

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.