Graph Theory: Multi-source and Single-source Shortest Path Algorithms

Shortest path problems in graph theory often rely on the concept of relaxation. Relaxation occurs when a path from node u to v can be shoretned by routing through an intermediate node k, i.e., if dist[u][v] > dist[u][k] + dist[k][v], we update dist[u][v] accordingly. Floyd-Warshall Algorithm (All-Pairs Shortest Paths) To compute shortest pat ...

Posted on Wed, 03 Jun 2026 18:20:34 +0000 by little_tris