Those data structures can not be learned from Leetcode — Treap

LORY
4 min readOct 23, 2022

A BST powered by heap which solves the BST degeneration problem

Continuing with advanced DSA topic : Skip list , B Tree Step by Step . in this article ,we walk through a powerful yet easier to implement (compare with red-black ,AVL, B-Tree) auto-balanced BST — Treap .

Binary Search Tree + Heap = Treap . sounds a cool idea, isn’t it ?

But first, lets see what problem treap trying to solve .

The Problem — BST Degeneration

--

--

LORY

A channel which focusing on developer growth and self improvement