Dijkstra algorithm, which solves the single-source shortest-paths problem, is a ................, and the Floyd-Warshall algorithm, which finds shortest…
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............
Show answerHide answer
Correct answer: (C) Greedy algorithm, Dynamic programming algorithm
Explanation
Dijkstra's algorithm for the single-source shortest-paths problem is a greedy algorithm, and the Floyd-Warshall algorithm for all-pairs shortest paths is a dynamic programming algorithm.