Running Time
Just like Prim's:
Call R
ELAX
at most once per edge, each might require adjust the priority queue:
.
Call E
XTRACT
-M
IN
once per vertex:
.
Total:
, assuming all edges reachable from source.
Can also implement the priority queue with a simple array and get
(better for dense graphs).
Next:
A
Up:
DIJKSTRA'S ALGORITHM
Previous:
Correctness