Kruskal's Algorithm
Controls
Kruskal's Algorithm Explanation

The goal of Kruskal's Algorithm is to find a minimum spanning tree of a weighted graph, i.e. a subset of the graph edges that forms a tree of the nodes and whose sum is minimized.

We attempt to add each edge into the tree, from least to greatest weight. If we cannot add an edge (i.e. it would create a cycle if added, disqualifying it as a tree), we skip over it. The algorithm finishes when a tree is formed.