The Floyd-Warshall algorithm is a classic Dynamic Programming algorithm used to compute all-pairs shortest paths in a weighted directed graph.
It defines the subproblem D(k)[i][j] as the shortest path from vertex i to vertex j using only intermediate vertices from the set {1,2,…,k}, with the recurrence relation:
D(k)[i][j]=min(D(k−1)[i][j],D(k−1)[i][k]+D(k−1)[k][j]) Hence, the correct option is (C).