Quiz

Choosing BFS vs DFS for Shortest Path

Understand why BFS finds shortest paths in unweighted graphs while DFS does not.

You need to find the minimum number of edges between two nodes in an unweighted, connected graph. Which traversal guarantees the correct answer, and why?