TODO: Kruskal’s algorithm