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

Method up

src/class148/FollowUp1.java:37–40  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

35 public static int[] size = new int[MAXN];
36
37 public static void up(int i) {
38 size[i] = size[left[i]] + size[right[i]] + count[i];
39 height[i] = Math.max(height[left[i]], height[right[i]]) + 1;
40 }
41
42 public static int leftRotate(int i) {
43 int r = right[i];

Callers 5

leftRotateMethod · 0.95
rightRotateMethod · 0.95
addMethod · 0.95
removeMethod · 0.95
removeMostLeftMethod · 0.95

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected