Treap Multiple choice Questions and Answers (MCQs)
What is the space complexity of a treap algorithm?
Question 1 Explanation:
The average case and worst case space complexity of a treap is mathematically found to be O(N).
A treap is a combination of a tree and a heap.
Question 2 Explanation:
A treap is a combination of a tree and a heap. The structure of a treap is determined by the fact that it is heap-ordered.
Which is the simplest of all binary search trees?
Question 3 Explanation:
A treap is the simplest of all binary search trees. Each node is given a numeric priority and implementation is non recursive.
What is the reason behind the simplicity of a treap?
Each node has data and a pointer
Each node is colored accordingly
It is a binary search tree following heap principles
Each node has a fixed priority field
Question 4 Explanation:
A treap is the simplest of all because we don't have to worry about adjusting the priority of a node.
What is the condition for priority of a node in a treap?
a node's priority should be greater than its parent
a node's priority should be at least as large as its parent
the priority is randomly assigned and can have any value
a node's priority is always given in decreasing order
Question 5 Explanation:
A node's priority should satisfy heap order. That is, any node's priority should be at least as large as its parent.
There are 5 questions to complete.