Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ access
Method
access
src/class201/Code07_Network1.java:125–131 ·
view source on GitHub ↗
(int x)
Source
from the content-addressed store, hash-verified
123
}
124
125
public
static
void
access(
int
x) {
126
for
(
int
y = 0; x != 0; y = x, x = fa[x]) {
127
splay(x);
128
rs[x] = y;
129
up(x);
130
}
131
}
132
133
public
static
void
makeroot(
int
x) {
134
access(x);
Callers
3
makeroot
Method · 0.95
findroot
Method · 0.95
split
Method · 0.95
Calls
2
splay
Method · 0.95
up
Method · 0.95
Tested by
no test coverage detected