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

Method up

src/class148/Code01_AVL1.java:53–56  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

51
52 // 修正信息
53 public static void up(int i) {
54 size[i] = size[left[i]] + size[right[i]] + count[i];
55 height[i] = Math.max(height[left[i]], height[right[i]]) + 1;
56 }
57
58 // i节点为头的树左旋,返回左旋后头节点的空间编号
59 public static int leftRotate(int 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