Commerce

Binary 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?

  1. A. Colors
  2. B. Levels
  3. C. Node size
  4. D. Heaps
Report Error

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?

  1. A. inorder, postorder, preorder traversals
  2. B. inorder
  3. C. postorder
  4. D. preorder
Report Error

What is the probability of selecting a tree uniformly at random?

  1. A. Equal to Catalan Number
  2. B. Less Than Catalan Number
  3. C. Greater than Catalan Number
  4. D. Reciprocal of Catalan Number
Report Error

How many types of insertion are performed in a binary tree?

  1. A. 1
  2. B. 2
  3. C. 3
  4. D. 4
Report Error

Cartesian trees are most suitable for?

  1. A. searching
  2. B. finding nth element
  3. C. minimum range query and lowest common ancestors
  4. D. self balancing a tree
Report Error

How will you find the maximum element in a binary search tree?

  1. A. public void max(Tree root) { while(root.left() != null) { root = root.left(); } System.out.println(root.data()); }
  2. B. public void max(Tree root) { while(root != null) { root = root.left(); } System.out.println(root.data()); }
  3. C. public void max(Tree root) { while(root.right() != null) { root = root.right(); } System.out.println(root.data()); }
  4. D. public void max(Tree root) { while(root != null) { root = root.right(); } System.out.println(root.data()); }
Report Error

What is the expected number of leaves in a randomized binary search tree?

  1. A. n + 1
  2. B. (n + 1)/3
  3. C. (n + 1)/2
  4. D. n + 3
Report Error

Which type of tree is tango tree?

  1. A. Ternary Tree
  2. B. AVL Tree
  3. C. Binary Search Tree
  4. D. K-ary Tree
Report Error

Is insertion and deletion operation faster in rope than an array?

  1. A. True
  2. B. False
Report Error

Comparing the speed of execution of Red-Black trees and AA-trees, which one has the faster search time?

  1. A. AA-tree
  2. B. Red-Black tree
  3. C. Both have an equal search time
  4. D. It depends
Report Error

Which of the following is the self-adjusting binary search tree?

  1. A. AVL Tree
  2. B. Splay Tree
  3. C. Top Tree
  4. D. Ternary Tree
Report Error

Who developed the concept of tango tree?

  1. A. Erik Demaine
  2. B. Mihai Patrascu
  3. C. John Lacono
  4. D. All of the mentioned
Report Error