A balanced binary tree over array intervals: each node stores an aggregate (sum/min/gcd/…) of its range. Supports point/range update and range query in O(logn)O(\log n)O(logn), and is far more flexible than a Fenwick tree (any associative op, lazy propagation).