Mental Model
We find the shortest path between every pair of points by checking if going through a middle point is shorter than the direct path.
Analogy: Imagine you want to travel between cities. Sometimes going through a third city is faster than going directly. We check all possible middle cities to find the quickest routes.
0 -> 3 -> ∞ ∞ -> 0 -> 1 ∞ -> ∞ -> 0 (∞ means no direct path)
