Bfs graph SSSP ( shortest path )

can anyone tell me the mistake

@chaman9 your code looks correct, could you tell me what problem are you facing.

actually i forgot to add an edge in the input… so my output was wrong

now i understood… thanks

1 Like