Kruskalís Algorithm
Kruskal()
{
†† T = ;
†† for each v ő V
††††† MakeSet(v);
†† sort E by increasing edge weight w
†† for each (u,v) ő E (in sorted order)
††††† if FindSet(u) Ļ FindSet(v)
†††††††† T = T 4 {{u,v}};
†††††††† Union(FindSet(u), FindSet(v));
}