For the first time, the balance tree "treap" [in more]

treap: a balanced binary search tree

What is treap (with spin)

treap=tree+heap, everyone knows this. Because the binary search tree is very easy to be stuck into a chain and affect the efficiency, we need a more balanced tree structure to maintain the excellent complexity of $O(logn).

So why is the heap involved? Because the heap has a very nice property, its height is $logn$

 

 

【Update】

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325661794&siteId=291194637