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 the shortest paths by considering each node as an intermediate point, checking if going through it shortens the path between every pair of nodes.
