Balanced Binary Tree Multiple choice Questions and Answers (MCQs)
Click on any option to know the CORRECT ANSWERS
What will be the height of a balanced full binary tree with 8 leaves?
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.
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.
Figure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?
Question 3 Explanation:
Only the node P will become unbalanced, with balance factor +2.
A binary tree is balanced if the difference between left and right subtree of every node is not more than .....
Question 4 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?
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.