Contents

A binary tree is balanced if the difference between left and right subtree of every node is not more than……….
a) 1                        
b) 3                        
c) 2                        
d) 0

a

Explanation: In a balanced binary tree the heights of two subtrees of every node never differ by more than 1.


Which of the following tree data structures is not a balanced binary tree?
a) AVL tree                          
b) Red-black tree
c) Splay tree                         
d) B-tree

d

Explanation: All the tree data structures given in options are balanced, but B-tree can have more than two children.


Which of the following data structures can be efficiently implemented using height balanced binary search tree?
a) sets                                    
b) priority queue
c) heap
d) both sets and priority queue

d

Explanation: Height-Balanced binary search tree can provide an efficient implementation of sets, priority queues.


Which of the following is an advantage of balanced binary search tree, like AVL tree, compared to binary heap?
a) insertion takes less time
b) deletion takes less time
c) searching takes less time
d) construction of the tree takes less time than binary heap

a

AVL trees are more balanced than Red-black trees.
a) True                                 
b) False

a

Explanation: AVL tree is more balanced than a Red-black tree because AVL tree has less height than Red-black tree given that both trees have the same number of elements.


Which of the following is not the self-balancing binary search tree?
a) AVL Tree                         
b) 2-3-4 Tree
c) Red – Black Tree           
d) Splay Tree

b

Explanation: 2-3-4 Tree is balanced search trees. But it is not a binary tree. So, it is not a self-balancing binary tree. AVL tree, Red-Black Tree and Splay tree are self-balancing binary search tree.