Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ up
Method
up
src/class201/Code05_OTOCI1.java:36–38 ·
view source on GitHub ↗
(int x)
Source
from the content-addressed store, hash-verified
34
35
// 汇总点权和
36
public
static
void
up(
int
x) {
37
sum[x] = sum[ls[x]] + sum[rs[x]] + arr[x];
38
}
39
40
public
static
boolean isroot(
int
x) {
41
return
ls[fa[x]] != x && rs[fa[x]] != x;
Callers
4
rotate
Method · 0.95
access
Method · 0.95
cut
Method · 0.95
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected