Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithmzuo/algorithm-journey
/ compute
Method
compute
src/class117/Code01_FlagPlan.java:69–75 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
67
}
68
69
public
static
void
compute() {
70
power = log2(n);
71
build();
72
for
(
int
i = 1; i <= n; i++) {
73
ans[line[i][0]] = jump(i);
74
}
75
}
76
77
// <=n最接近的2的幂,是2的几次方
78
public
static
int
log2(
int
n) {
Callers
1
main
Method · 0.95
Calls
3
log2
Method · 0.95
build
Method · 0.95
jump
Method · 0.95
Tested by
no test coverage detected