Show the worked solutionFloyd-Warshall computes shortest paths between every pair of vertices in one \(\Theta(V^3)\) dynamic program, and it allows negative edge weights (no negative cycles).(A) Dijkstra is single-source; running it from every vertex works only for non-negative weights.(B) Bellman-Ford is single-source; running it from every vertex costs \(O(V^2E)\).(C) Kruskal finds a minimum spanning tree, not shortest paths — incorrect.Answer: D
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com