|
ADS
Algorithms and Data Structures
|
The treap of Seidel and Aragon, beyond the book. More...
Files | |
| file | ADS/tree/Treap.h |
| The treap of Seidel and Aragon, beyond the book: a binary search tree on the keys that is also a heap on random priorities given to the keys when they are inserted, so that its shape is that of a binary search tree built by inserting the keys in a random order, whatever the order of the operations; the expected depth of a node is \( O( \log n ) \), and an insertion or a removal takes \( O( \log n ) \) expected time and makes fewer than 2 rotations on average. | |
Classes | |
| struct | ADS::TreapNodes< K, V > |
| the adaptor of the nodes of a Treap [see JoinAdaptor] More... | |
| class | ADS::Treap< K, V > |
| a DICTIONARY on a treap, with the operations based on join [see Joinable] More... | |
The treap of Seidel and Aragon, beyond the book.
The definitions, the invariants and the costs of the area are in Theory of trees.