Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/data-structures/LazySegmentTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions content/data-structures/MoQueries.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading