Kruskal's algorithm
Sort all of the arcs in ascending order of weight.
For each arc add it only if it does not create a loop or a cycle.

Sort all of the arcs in ascending order of weight.
For each arc add it only if it does not create a loop or a cycle.