kruskal's algorithm | ScratchStats