Expand description
A treap-based sorted list.
Supports the following operations, each O(log n):
SortedList::insert/SortedList::removeSortedList::bisect_left/SortedList::bisect_rightSortedList::get
SortedList::len and SortedList::is_empty are O(1).
Implementation note: nodes are stored in a flat Vec<Node> addressed by
1-based indices (0 = none). Removed nodes go to a free_stack so the
underlying storage can be reused without growing the array.
Structsยง
- Sorted
List - Treap-backed sorted list of
i64keys with multiplicity.