[prev] 150 [next]

Prim's Algorithm (cont)

Rough time complexity analysis …
  • V iterations of outer loop
  • find min edge with set of edges is O(E)O(V·E) overall
Using a priority queue
  • O(E·log V) overall