Glossary: Algorithms Beyond the Basics in JavaScript
Kruskal's algorithm
Also written: Kruskal
A greedy way to build a minimum spanning tree: go through the roads from shortest to longest and keep each one that joins two places not yet connected. It uses union-find to check this.