Tech News
← Home  ·  All topics

Binary Search Tree

1 GoKawiil brief on this topic

CP-Algorithms explains treap data structure combining BST and heap properties

The article describes the treap (cartesian tree), a data structure that stores (X,Y) pairs as a binary search tree ordered by X and a binary heap ordered by Y. It credits Raimund Seidel and Cecilia Aragon with proposing the structure in 1989, and explains that assigning random priority values yields balanced trees, giving operations like insert and search O(log N) average complexity.