You mean heap?

Computer Science Level pending

A treap is essentially a binary search tree, where each key is given a numeric priority(like a heap). It has two ordering invariants:

  • Any node has a higher priority than all of its descendant nodes.

  • Any node's key is greater than the keys in its left subtree and less than the keys in its right subtree.

What is the probability (in decimal) that the root of a treap with size 64 has a left or right subtree of 61?


Problem Loading...

Note Loading...

Set Loading...