We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ca8ae2 commit 0785f30Copy full SHA for 0785f30
graph/kruskal.go
@@ -42,7 +42,7 @@ func KruskalMST(n int, edges []Edge) ([]Edge, int) {
42
// Add the weight of the edge to the total cost
43
cost += edge.Weight
44
// Merge the sets containing the start and end vertices of the current edge
45
- u = u.Union(int(edge.Start), int(edge.End))
+ u.Union(int(edge.Start), int(edge.End))
46
}
47
48
0 commit comments