Provided that we know the edge weight (u, v), we can also just add it to the front of our sorted list of edge weights (since Kruskal sorts the edge weights in ascending order). In this case, the edge (u, v) will be the first edge included in our tree, and Kruskal will work fine by finding a spanning tree with a minimum weight with (u, v).
source share