Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Seogeurim/CS-study
/ find
Method
find
contents/algorithm/code/KruskalTest.java:52–55 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
50
}
51
52
private
int
find(
int
n) {
53
if
(root[n] == n)
return
n;
54
return
root[n] = find(root[n]);
55
}
56
57
private
void
merge(
int
a,
int
b) {
58
root[find(b)] = find(a);
Callers
2
getMSTCost
Method · 0.95
merge
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected