Concept Flow - Floyd-Warshall algorithm
Start with distance matrix
For each intermediate vertex k
For each source vertex i
For each destination vertex j
Check if path i->k + k->j < i->j
Yes No
Update distance i->j
Repeat for all i,j,k
Final shortest paths matrix
The algorithm updates shortest paths by considering each vertex as an intermediate stop, improving distances step-by-step.
