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

Method leftRotate

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

Source from the content-addressed store, hash-verified

40 }
41
42 public static int leftRotate(int i) {
43 int r = right[i];
44 right[i] = left[r];
45 left[r] = i;
46 up(i);
47 up(r);
48 return r;
49 }
50
51 public static int rightRotate(int i) {
52 int l = left[i];

Callers 1

maintainMethod · 0.95

Calls 1

upMethod · 0.95

Tested by

no test coverage detected