---
# System prepended metadata

title: Fenwick Tree (BIT) - Lương Nguyên Khoa

---

## Insert
```cpp!
void insert(int index, int value) {
        int delta = value - getSum(index, index);
        update(index, delta);
}
```

