DSA · Reimagined
Graphs hard time O(E log V) space O(V)

Dijkstra’s Shortest Path

Keep a best-known distance for every node. Repeatedly settle the closest unsettled node — its distance can no longer improve — and relax its edges, lowering neighbours’ distances where a shorter route has been found.

4215863A0BCDEF
settledempty

Start at A with distance 0; every other node is ∞ — unreachable so far.

1 / 15
A fixed scene — scrub through it, or open the code.

Practice

Machine twin: /dsa-viz-v2/dijkstra.json — the full deterministic run as structured data.