CLICKHERE's blog

By CLICKHERE, history, 4 years ago, In English

Is this Prim's MST Source Code is O(E logV) for dense graph? Notes: https://codeforces.com/blog/entry/68133?#comment-524560

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Of course. But, that is guaranteed for Prim's MST algorithm when using a priority queue.

But you can do better by using an array instead in the case of dense graphs.