DOWNLOAD FREE PDF <<CLICK HERE>>
Balanced Binary Tree Multiple choice Questions and Answers (MCQs)
Congratulations - you have completed Balanced Binary Tree Multiple choice Questions and Answers (MCQs).
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |
What will be the height of a balanced full binary tree with 8 leaves?
8 | |
5 | |
6 | |
4 |
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 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |
The balance factor of a node in a binary tree is defined as .....
addition of heights of left and right subtrees | |
height of right subtree minus height of left subtree | |
height of left subtree minus height of right subtree | |
height of right subtree minus one |
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 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |
Figure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?
2 | |
1 | |
3 | |
0 |
Question 3 Explanation:
Only the node P will become unbalanced, with balance factor +2.
Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |
A binary tree is balanced if the difference between left and right subtree of every node is not more than .....
1 | |
3 | |
2 | |
0 |
Question 4 Explanation:
In a balanced binary tree the heights of two subtrees of every node never differ by more than 1.
Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |
Which of the following tree data structures is not a balanced binary tree?
AVL tree | |
Red-black tree | |
Splay tree | |
B-tree |
Question 5 Explanation:
All the tree data structures given in options are balanced, but B-tree can have more than two children.
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
There are 5 questions to complete.