Make sure you click rerun for this amazing implementation of Kruskal's algorithm for finding the minimum spanning tree of a graph. In other words, this will find the minimum weighted path that connects all vertices in this graph. If you're not familiar with the algorithm (or graph theory in general), looking through the code here probably won't reveal much. But if anyone is interested, the algorithm is surprisingly easy to follow in a theoretical sense and we would be more than happy to write up a quick tutorial on how it's done.
See the Pen Kruskal Minimum Spanning Tree by nicolas barradeau (@nicoptere) on CodePen.