Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShahjalalShohag/code-library
/ query
Method
query
Miscellaneous/Parallel Binary Search.cpp:27–31 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
25
}
26
27
T query(int idx) {
28
T ans = 0;
29
for(; idx >= 1; idx -= (idx & -idx)) ans += t[idx];
30
return ans;
31
}
32
33
void upd(int idx, T val) {
34
if(idx <= 0) return;
Callers
1
main
Function · 0.45
Calls
1
query
Function · 0.50
Tested by
no test coverage detected