Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShahjalalShohag/code-library
/ log2Up
Function
log2Up
Data Structures/SQRT Tree.cpp:18–24 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
16
}
17
18
inline int log2Up(int n) {
19
int res = 0;
20
while ((1 << res) < n) {
21
res++;
22
}
23
return res;
24
}
25
//0-indexed
26
struct SqrtTree {
27
int n, llg, indexSz;
Callers
1
SqrtTree
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected