Question 21
In Bellman-Ford, after relaxing all edges V-1 times, how do we detect if a negative weight cycle is reachable from the source?
Shortest simple paths contain at most V-1 edges. If distances can still decrease on the V-th relaxation pass, a negative cycle exists.