BFS Advantage

The shortest path from S to each vertex will be found: