Update Kruskal's MST algorithm with a faster union find implementation