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

Method rightRotate

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

Source from the content-addressed store, hash-verified

49 }
50
51 public static int rightRotate(int i) {
52 int l = left[i];
53 left[i] = right[l];
54 right[l] = i;
55 up(i);
56 up(l);
57 return l;
58 }
59
60 public static int maintain(int i) {
61 int lh = height[left[i]];

Callers 1

maintainMethod · 0.95

Calls 1

upMethod · 0.95

Tested by

no test coverage detected