MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / updateBIT

Function updateBIT

CPP/Fenwick Tree/fenwickTree.cpp:16–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16void updateBIT(int BITree[], int n, int index, int val)
17{
18 index = index + 1;
19 while (index <= n)
20 {
21 BITree[index] += val;
22 index += index & (-index);
23 }
24}
25
26int *constructBITree(int arr[], int n)
27{

Callers 2

constructBITreeFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected