Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ leftRotate
Method
leftRotate
src/class151/FollowUp1.java:41–48 ·
view source on GitHub ↗
(int i)
Source
from the content-addressed store, hash-verified
39
}
40
41
public
static
int
leftRotate(
int
i) {
42
int
r = right[i];
43
right[i] = left[r];
44
left[r] = i;
45
up(i);
46
up(r);
47
return
r;
48
}
49
50
public
static
int
rightRotate(
int
i) {
51
int
l = left[i];
Callers
2
add
Method · 0.95
remove
Method · 0.95
Calls
1
up
Method · 0.95
Tested by
no test coverage detected