DataStructures
October 8, 2023DataStructures
October 8, 2023DataStructures
Question 44

A weightbalanced tree is a binary tree in which for each node, the number of nodes in the left subtree is at least half and at most twice the number of nodes in the right subtree. The maximum possible height (number of nodes on the path from the root to the furthest leaf) of such a tree on n nodes is best described by which of the following?
log_{2}n


log_{4/3}n


log_{3}n


log_{3/2}n

Question 44 Explanation:
Number of nodes in the left subtree is atleast half and atmost the num begin right sub tree.
No. of nodes in left sub tree = 2 right sub tree
No. of nodes in left sub tree = (n1/3)
No. of nodes in right sub tree = 2(n1/3)
Height of the tree = log_{3/2} n
No. of nodes in left sub tree = 2 right sub tree
No. of nodes in left sub tree = (n1/3)
No. of nodes in right sub tree = 2(n1/3)
Height of the tree = log_{3/2} n
Correct Answer: D
Question 44 Explanation:
Number of nodes in the left subtree is atleast half and atmost the num begin right sub tree.
No. of nodes in left sub tree = 2 right sub tree
No. of nodes in left sub tree = (n1/3)
No. of nodes in right sub tree = 2(n1/3)
Height of the tree = log_{3/2} n
No. of nodes in left sub tree = 2 right sub tree
No. of nodes in left sub tree = (n1/3)
No. of nodes in right sub tree = 2(n1/3)
Height of the tree = log_{3/2} n
Subscribe
Login
0 Comments