Programming · by Mehdi Benali · 2026-10-28
Treap (Cartesian tree): the data structure you forgot you liked
Random priorities + BST ordering = balanced-ish tree with simple split/merge. Way easier to implement than red-black trees. Anyone actually using treaps in production code, or is it just a competitive programming thing?
20 sparks · 2 comments