โ† Back to Index

๐Ÿงฎ Floyd-Warshall

All-Pairs Shortest Path ยท Matrix + Graph
0
Pivot k
0,0
Cell i,j
0
Updates
โˆž
Current Distance
Ready
Status
Current pivot node k
Improved shortest path
Current source/target pair
Candidate path through k

How It Works

Floyd-Warshall tries every node k as an intermediate pivot. For each pair (i, j), it checks whether going through k improves the current best distance.