Kruskal’s Algorithm with Disjoint Set ADT
KruskalMST (undirected graph G): set of edges in MST
Set T; (initialized empty) // set of edges in tree
components := n; // number of connected comps of (G,E’)
for each vertex v of G do MakeSet(v);
while components > 1 do // process next edge in order
(u,w) := next edge in sorted order;
if (U different from W) then
components := components - 1;