Single Source Shortest Path using BFS Graphs

my code is correct but i am not getting the correct distance from src node here is my code:https://ide.codingblocks.com/s/359071


Hey @jatinupadhyay786
You forgot to add this edge :

g.addEdge(3,0);

If this resolves your query then please mark it as resolved :slight_smile:

hello @jatinupadhyay786
u have reopend the doubt, what issue u r facing now?