QUESTION 8 OF 10

Why does BFS find shortest paths in unweighted graphs?

Reveal the answer and explore the explanation.

08
Medium

Why does BFS find shortest paths in unweighted graphs?

Answer
Answer

Explores graph layers in increasing edge distance from a start.

Practical example

Find shortest paths in an unweighted graph.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As