minimum spanning tree (connect all vertices in undirected graphic)

both are greedy algorithm - kruskal algorithm, O(ElgV) make set for each vertex. set only contains one vertex sort G.E in non-descending order by weight of edge. for each edge(u,v), if they are not in
相關文章
相關標籤/搜索