Why it matters
Dijkstra is greedy classic. Understanding shapes graph search.
Advertisement
The architecture
Extract min-dist vertex.
Relax outgoing edges.
Mark visited; repeat.
Advertisement
How it works end to end
Non-negative edges required.
Binary heap: O((V+E) log V).
Fibonacci heap: O(E + V log V).