Binary-indexed tree: an array that supports prefix-sum queries and point updates in O(logn)O(\log n)O(logn) using bit tricks on the index. Smaller and faster constants than a segment tree when only prefix sums are needed.