CommerceBinary Search TreesB Tree MCQs
Practice Binary Search TreesB Tree MCQs for competitive exams.
Binary Search TreesB Tree MCQs
Practice questions from this topic.
AA Trees are implemented using?
- A. Colors
- B. Levels
- C. Node size
- D. Heaps
Correct Answer: B
Which of the following tree traversals work if the null left pointer pointing to the predecessor and null right pointer pointing to the successor in a binary tree?
- A. inorder, postorder, preorder traversals
- B. inorder
- C. postorder
- D. preorder
Correct Answer: A
What is the probability of selecting a tree uniformly at random?
- A. Equal to Catalan Number
- B. Less Than Catalan Number
- C. Greater than Catalan Number
- D. Reciprocal of Catalan Number
Correct Answer: D
How many types of insertion are performed in a binary tree?
- A. 1
- B. 2
- C. 3
- D. 4
Correct Answer: B
Cartesian trees are most suitable for?
- A. searching
- B. finding nth element
- C. minimum range query and lowest common ancestors
- D. self balancing a tree
Correct Answer: C
How will you find the maximum element in a binary search tree?
- A. public void max(Tree root) { while(root.left() != null) { root = root.left(); } System.out.println(root.data()); }
- B. public void max(Tree root) { while(root != null) { root = root.left(); } System.out.println(root.data()); }
- C. public void max(Tree root) { while(root.right() != null) { root = root.right(); } System.out.println(root.data()); }
- D. public void max(Tree root) { while(root != null) { root = root.right(); } System.out.println(root.data()); }
Correct Answer: C
What is the expected number of leaves in a randomized binary search tree?
- A. n + 1
- B. (n + 1)/3
- C. (n + 1)/2
- D. n + 3
Correct Answer: B
Which type of tree is tango tree?
- A. Ternary Tree
- B. AVL Tree
- C. Binary Search Tree
- D. K-ary Tree
Correct Answer: C
Is insertion and deletion operation faster in rope than an array?
- A. True
- B. False
Correct Answer: A
Comparing the speed of execution of Red-Black trees and AA-trees, which one has the faster search time?
- A. AA-tree
- B. Red-Black tree
- C. Both have an equal search time
- D. It depends
Correct Answer: A
Which of the following is the self-adjusting binary search tree?
- A. AVL Tree
- B. Splay Tree
- C. Top Tree
- D. Ternary Tree
Correct Answer: B
Who developed the concept of tango tree?
- A. Erik Demaine
- B. Mihai Patrascu
- C. John Lacono
- D. All of the mentioned
Correct Answer: D