Graph Theory37 sections · 1633 units
Open in CourseQuiz: BFS Shortest Path Guarantee
Knowledge check
Check Your Understanding
BFS guarantees the shortest path in unweighted graphs. Why does DFS not give the same guarantee?
- A.DFS uses more memory than BFS
- B.DFS explores one branch fully before trying others, so it may find a longer path first
- C.DFS cannot handle cycles
- D.DFS does not use a visited array