Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ find
Method
find
src/class191/Code06_Network1.java:110–115 ·
view source on GitHub ↗
(int i)
Source
from the content-addressed store, hash-verified
108
}
109
110
public
static
int
find(
int
i) {
111
if
(i != fa[i]) {
112
fa[i] = find(fa[i]);
113
}
114
return
fa[i];
115
}
116
117
public
static
void
union(
int
x,
int
y) {
118
x = find(x);
Callers
2
union
Method · 0.95
link
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected