Which algorithm solves the all-pairs shortest path problem for graphs with negative weight edges?
Correct answer
D. Johnson's Algorithm
18 views
D. Johnson's Algorithm
18 views
Johnson's algorithm reweights edges using Bellman-Ford and then runs Dijkstra from every vertex, solving all-pairs shortest paths with negative edge weights (no negative cycles) efficiently. Bellman-Ford alone is a single-source algorithm.
Asked in: GATE CS, UGC NET CS
https://www.geeksforgeeks.org/bellman-ford-algorithm-dp-23/Not sure why the answer is D? Ask here and get an explanation.