| 14 | } |
| 15 | |
| 16 | void 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 | |
| 26 | int *constructBITree(int arr[], int n) |
| 27 | { |
no outgoing calls
no test coverage detected