DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Treap (Cartesian Tree)

Quality: 8/10 Relevance: 7/10

Summary

Treap (Cartesian Tree) is a data structure that merges a binary search tree by X with a binary heap by Y. The cp-algorithms page explains core operations (Split, Merge, Insert, Erase, Build, Union, Intersect), implementation details, and variations such as implicit treaps and offline O(N) construction, along with practical considerations like maintaining subtree sizes.

🚀 Service construit par Johan Denoyer