Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShahjalalShohag/code-library
/ query
Function
query
Data Structures/Sparse Table.cpp:16–19 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
14
}
15
16
int query(int l, int r) {
17
int k = 31 - __builtin_clz(r - l + 1);
18
return min(t[l][k], t[r - (1 << k) + 1][k]);
19
}
20
21
int32_t main() {
22
ios_base::sync_with_stdio(0);
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected