• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Balanced Binary Search Trees with Answers

Question 1

The worst case running time to search for an element in a balanced in a binary search tree with n2^n elements is 
(A) [Tex]\\Theta(n log n) [/Tex]
(B) [Tex]\\Theta (n2^n) [/Tex]
(C) [Tex]\\Theta (n) [/Tex]
(D) [Tex]\\Theta (log n) [/Tex]

  • A

  • B

  • C

  • D

Question 2

What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.
  • 2
  • 3
  • 4
  • 5

Question 3

Consider the following AVL tree.
         60
      /     \\  
    20      100
           /   \\
         80    120     

Which of the following is updated AVL tree after insertion of 70
A
        70
      /    \\  
    60      100
   /       /    \\
 20       80    120 

B
        100
      /    \\  
    60      120
   /  \\     /  
 20   70   80   


C
        80
      /    \\  
    60      100
   /  \\       \\
 20   70      120

D
        80
      /    \\  
    60      100
   /       /   \\
 20      70    120  
  • A
  • B
  • C
  • D

Question 4

Which of the following is a self-adjusting or self-balancing Binary Search Tree
  • Splay Tree
  • AVL Tree
  • Red Black Tree
  • All of the above

Question 5

Which of the following is true

  • The AVL trees are more balanced compared to Red Black Trees, but they may cause more rotations during insertion and deletion.

  • Heights of AVL and Red-Black trees are generally same, but AVL Trees may cause more rotations during insertion and deletion.

  • Red Black trees are more balanced compared to AVL Trees, but may cause more rotations during insertion and deletion.

  • Heights of AVL and Red-Black trees are generally same, but Red Black trees may cause more rotations during insertion and deletion.

Question 6

Which of the following is true about Red Black Trees?
  • The path from the root to the furthest leaf is no more than twice as long as the path from the root to the nearest leaf
  • At least one children of every black node is red
  • Root may be red
  • A leaf node may be red

Question 7

Which of the following is true about AVL and Red Black Trees?
  • In AVL tree insert() operation, we first traverse from root to newly inserted node and then from newly inserted node to root. While in Red Black tree insert(), we only traverse once from root to newly inserted node.
  • In both AVL and Red Black insert operations, we traverse only once from root to newly inserted node,
  • In both AVL and Red Black insert operations, we traverse twiceL first traverse root to newly inserted node and then from newly inserted node to root.
  • None of the above

Question 8

What is the worst case possible height of Red-Black tree? Assume base of Log as 2 in all options
  • 2Log(n+1)
  • 1.44 Logn
  • 4Logn
  • None of the above

Question 9

Is the following statement valid? A Red-Black Tree which is also a perfect Binary Tree can have all black nodes
  • Yes
  • No

Question 10

Which of the following operations are used by Red-Black trees to maintain balance during insertion/deletion?

a) Recoloring of nodes
b) Rotation (Left and Right)
  • Only a
  • Only b
  • Both a and b
  • Neither a nor b

There are 20 questions to complete.

Last Updated :
Take a part in the ongoing discussion