Expand description
A generic segment tree.
T is the type of the data in the array; F is the merge function
(typically a sum, min, max, or xor closure).
Both query and update run in O(log n). The tree is stored in
a flat Vec<T> of size 4 * n, which is the standard bound for an
implicit binary-tree representation.
Structsยง
- Segment
Tree - Generic segment tree.