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 .