The simple data structure yields a linear-time algorithm for dense graphs, .
Can do better for sparse graphs.
Heap: Running time per operation? , , .
Total running time:
Worse for dense graphs, better for sparse graphs.