Balanced Binary Tree Multiple choice Questions and Answers (MCQs)

 

 Buy/Download all MCQ Ebook   >>>Click Here<<<

Balanced Binary Tree Multiple choice Questions and Answers (MCQs)

Click on any option to know the CORRECT ANSWERS

Question 1
What will be the height of a balanced full binary tree with 8 leaves?
A
8
B
5
C
6
D
4
Reading comprehension Questions answers

Question 1 Explanation: 
A balanced full binary tree with l leaves has height h, where h = log2l + 1.

So, the height of a balanced full binary tree with 8 leaves = log28 + 1 = 3 + 1 = 4.

Question 2
The balance factor of a node in a binary tree is defined as .....
A
addition of heights of left and right subtrees
B
height of right subtree minus height of left subtree
C
height of left subtree minus height of right subtree
D
height of right subtree minus one
UPSC GS Questions answers

Question 2 Explanation: 
For a node in a binary tree, the difference between the heights of its left subtree and right subtree is known as balance factor of the node.

Question 3
Figure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?
A
2
B
1
C
3
D
0
Visual arts Questions answers

Question 3 Explanation: 
Only the node P will become unbalanced, with balance factor +2.

Question 4
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
History Questions answers

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

Question 5
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
GK Questions answers

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

There are 5 questions to complete.

 

 Buy/Download all MCQ Ebook >>>CLICK HERE<<<