Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ build
Method
build
src/class174/Code05_Lcm1.java:67–74 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
65
}
66
67
public
static
void
build() {
68
for
(
int
i = 1; i <= n; i++) {
69
fa[i] = i;
70
siz[i] = 1;
71
maxa[i] = -1;
72
maxb[i] = -1;
73
}
74
}
75
76
public
static
int
find(
int
x) {
77
while
(x != fa[x]) {
Callers
1
compute
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected