Graph Theory37 sections · 1633 units
Open in Course

Quiz: 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?

  1. A.DFS uses more memory than BFS
  2. B.DFS explores one branch fully before trying others, so it may find a longer path first
  3. C.DFS cannot handle cycles
  4. D.DFS does not use a visited array
Start the roadmap to answer the quizzes and solve the challenges