Dijkstra algorithm, which solves the single-source shortest-paths problem, is a_______________, and the Floyd-Warshall algorithm, which finds shortest paths between all pairs of vertices, is a _____________.
A. Greedy algorithm, Divide-conquer algorithm
B. Divide-conquer algorithm, Greedy algorithm
C. Greedy algorithm, Dynamic programming algorithm
D. Dynamic programming algorithm, Greedy algorithm
Answer:D
Dijkstra algorithm, which solves the single-source shortest-paths problem, is a_______________, and the Floyd-Warshall algorithm, which finds shortest paths between all pairs of vertices, is a _____________.
A. Greedy algorithm, Divide-conquer algorithm B. Divide-conquer algorithm, Greedy algorithm C. Greedy algorithm, Dynamic programming algorithm D. Dynamic programming algorithm, Greedy algorithm