Better Data Structure

The simple data structure yields a linear-time algorithm for dense graphs, tex2html_wrap_inline281 .

Can do better for sparse graphs.

Heap: Running time per operation? tex2html_wrap_inline283 , tex2html_wrap_inline283 , tex2html_wrap_inline283 .

Total running time: tex2html_wrap_inline289

Worse for dense graphs, better for sparse graphs.


next up previous
Next: Even Better Data Structure Up: PRIM'S ALGORITHM Previous: Running-Time Analysis