Practice · 3 of 3
The Weakest Sufficient Tool
CHALLENGE
Difficulty: advanced+25 XP
**Scenario.** A weighted graph where every edge weight is 0 or 1, n = 200000 edges = 400000: shortest path from s to every node. Which tool? **Which approach is the best fit? The program only needs to print the letter.** **A)** Dijkstra with a priority queue **B)** 0-1 BFS with a deque — O(V + E), no heap **C)** Bellman–Ford, it handles everything **D)** DFS with backtracking on ties
Press Submit to check your solution.
Back to lesson: Practice: Graph Synthesis Drills