Algorithm design technique to find all the pairs of shortest distances in a graph - Dynamic programming
Q. Algorithms: From the following algorithm design techniques which one is used to find all the pairs of shortest distances in a graph?- Published on 24 Jun 15a. Backtracking
b. Greedy
c. Dynamic programming
d. Divide
ANSWER: Dynamic programming
The Bellman-Ford algorithm is used to find all the pairs of shortest distances in a graph.