You mean heap?

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?


The answer is 0.03125.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...