BFS - Shortest Path Promblem


plz check my code

When dist[i] == INT_MAX your code prints twice. Firstly, -1 then value at dist[i]. Add else at line 58.