MCPcopy 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

rotateMethod · 0.95
accessMethod · 0.95
cutMethod · 0.95
mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected