Skip to main content

Crate sorted_list

Crate sorted_list 

Source
Expand description

A treap-based sorted list.

Supports the following operations, each O(log n):

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ยง

SortedList
Treap-backed sorted list of i64 keys with multiplicity.