Concept Flow - Floyd Warshall All Pairs Shortest Path
Start with distance matrix
Pick intermediate node k
For each pair (i, j)
Check if path i->k->j is shorter
Yes No
Update dist[i
Repeat for all k
Final shortest paths matrix
The algorithm updates shortest paths by considering each node as an intermediate step, checking if going through it shortens any path.
