Category
Level
A treap is a binary search tree on keys combined with a heap on random priorities, which keeps the tree balanced in expectation.