Which node has the lowest priority in a treap?

Category: QuestionsWhich node has the lowest priority in a treap?
Editor">Editor Staff asked 4 weeks ago

Which node has the lowest priority in a treap?
 
(a) root node
 
(b) leaf node
 
(c) null node
 
(d) centre node
 
The query is from Binary Trees topic in chapter Binary Trees of Data Structures & Algorithms I
 
I got this question during a job interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Right choice is (a) root node
 
The best explanation: A root node has the lowest priority in a treap since the node’s priority is based on heap order.