Bellman-Ford shortest paths
Level 3 of 3
Also called Bellman-Ford algorithm and Single-source shortest paths with negative lengths.
Finds the shortest way from one place to every other on one-way roads, even roads that pay you back, with a length below 0. Look along every road, round after round, until a whole round makes nothing shorter; if a loop of roads keeps getting shorter for ever, it says so.
- roads looked along
- 0
- rounds
- 0
step 1 of 1
Examples