Advanced Data Structures & Algorithms
Q90 / 100

What is a treap?

Correct! Well done.

Incorrect.

The correct answer is B) A BST that simultaneously satisfies heap order on random priorities, achieving O(log n) expected height without explicit rebalancing

B

Correct Answer

A BST that simultaneously satisfies heap order on random priorities, achieving O(log n) expected height without explicit rebalancing

Explanation

A treap is a randomized BST: each node has a key (BST order) and a random priority (max-heap order). The random priorities keep height O(log n) with high probability.

Progress
90/100