MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / up

Method up

src/class201/Code07_Network1.java:46–48  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

44 public static HashMap<Long, Integer> edgeColor = new HashMap<>();
45
46 public static void up(int x) {
47 maxv[x] = Math.max(Math.max(maxv[ls[x]], maxv[rs[x]]), arr[x]);
48 }
49
50 public static boolean isroot(int x) {
51 return ls[fa[x]] != x && rs[fa[x]] != x;

Callers 4

rotateMethod · 0.95
accessMethod · 0.95
cutMethod · 0.95
updateNodeMethod · 0.95

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected