Those data structures can not be learned from Leetcode — Treap

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



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

A Senior Software Developer/Body builder . to help others enjoy coding and stay healthy