A cross-cutting branch: not a family of structures but a family of strategies for answering many questions about subarrays, subtrees and submatrices.

Choosing a technique

SituationUse
Static array, idempotent op (min/max/gcd)Sparse Table
Point update, prefix-invertible opFenwick Tree
Point/range update, any associative opSegment Tree
Range update with a weird opSegment Tree Beats
Offline queries, no updatesMo’s Algorithm
Queries interleaved with updates, offlineOffline + CDQ / BIT sweep
Historic versionsPersistent Segment Tree
Nothing else fits, n ≤ 2·10^5Sqrt Decomposition

Techniques

See also: Data Structures · DSU on Tree