Evaluation of Prim
n vertices and m edges.
Priority queue O(log n) per operation.
O(m) priority queue operations.
An edge is visited when a vertex incident to it joins the tree.
Time complexity is O(m log n).
Storage complexity is O(m).
Previous slide
Next slide
Back to first slide
View graphic version