Question: 23
(Choose 1 answer)
Which of the following algorithms guarantees the shortest path tree from a single source vertex to all other
vertices in a weighted graph, assuming non-negative edge weights?
A. Depth-First Search (DFS)
B. Breadth-First Search (BFS)
C. Prim's algorithm
D. Dijkstra's algorithm