Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/JavaScript
/ union
Method
union
Graphs/KruskalMST.js:30–33 ·
view source on GitHub ↗
(x, y)
Source
from the content-addressed store, hash-verified
28
}
29
30
union(x, y) {
31
// Function to merge 2 disjoint sets
32
this.link(this.findSet(x), this.findSet(y))
33
}
34
35
link(x, y) {
36
// Helper function for union operation
Callers
2
KruskalMST
Method · 0.95
UnionFind.test.js
File · 0.80
Calls
2
link
Method · 0.95
findSet
Method · 0.95
Tested by
no test coverage detected