Which one of the following algorithm design techniques is used in finding all pairs of shortest distances in a graph?
- A. Dynamic programming
- B. Backtracking
- C. Greedy
- D. Divide and Conquer
Answer: A. Dynamic programming
Explanation: The Floyd-Warshall algorithm for all-pairs shortest paths uses Dynamic Programming.