diff --git a/content/data-structures/LazySegmentTree.h b/content/data-structures/LazySegmentTree.h index ecad9a0a5..f3f65905f 100644 --- a/content/data-structures/LazySegmentTree.h +++ b/content/data-structures/LazySegmentTree.h @@ -5,6 +5,7 @@ * Source: me * Description: Segment tree with ability to add or set values of large intervals, and compute max of intervals. * Can be changed to other things. + * Updates and Queries are inclusive-exclusive, i.e. of the form [L, R). * Use with a bump allocator for better performance, and SmallPtr or implicit indices to save memory. * Time: O(\log N). * Usage: Node* tr = new Node(v, 0, sz(v)); diff --git a/content/data-structures/MoQueries.h b/content/data-structures/MoQueries.h index cda924695..db51655e6 100644 --- a/content/data-structures/MoQueries.h +++ b/content/data-structures/MoQueries.h @@ -5,6 +5,7 @@ * Source: https://github.com/hoke-t/tamu-kactl/blob/master/content/data-structures/MoQueries.h * Description: Answer interval or tree path queries by finding an approximate TSP through the queries, * and moving from one query to the next by adding/removing points at the ends. + * Queries are inclusive-exclusive, i.e. of the form [L, R). * If values are on tree edges, change \texttt{step} to add/remove the edge $(a, c)$ and remove the initial \texttt{add} call (but keep \texttt{in}). * Time: O(N \sqrt Q) * Status: stress-tested