Why Kruskal Algorithm has to iterate all edges?

前端 未结 0 2004
有刺的猬
有刺的猬 2020-11-30 13:27

So here is the pseudocode of Kruskal from Wiki

algorithm Kruskal(G) is
F:= ∅
for each v ∈ G.V do
    MAKE-SET(v)
for each (u, v) in G.E ordered by weight(u, v         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题