Every pair's shortest distance, in one triple loop.
dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])
Cell (i,j) = best distance so far · dark = ∞ · teal diagonal = 0. Each frame switches on one intermediate node; improved cells flash orange.
Floyd-Warshall = flat (ignores edge count). Dijkstra×V = rises with edges. Sparse: Dijkstra×V 5× faster. Dense: gap closes to 1.4×; compiled → FW wins.
dist[i][i] < 0 on the diagonalThree lines, all pairs. Specialist for small/dense; wrong for huge sparse. Shortest-path thread done: BFS · Dijkstra · Bellman-Ford · Floyd-Warshall. Next: A* — a heuristic that steers toward a goal.