Fenwick Tree

Problems on Fenwick trees, including prefix sums with point updates, counting inversions, counting smaller elements to the left, range updates with point queries, and two-dimensional sums.

The prefix sums article in the Basics section covers the static version of the problem. Related problem sets are under Segment tree, Prefix sums and Range queries.

Problems