Heap - mmedrano9438/peripheral-brain GitHub Wiki

The basic structure of a treap is that of a binary tree, with each node containing a key and a priority. The keys are ordered to fit the BST property, where each node has a key greater than the keys of all nodes in its left subtree, and smaller than the keys of all nodes in its right subtree.