###### Data-Structures

October 8, 2023###### Data-Structures

October 8, 2023# Data-Structures

Question 44 |

A weight-balanced 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 = (n-1/3)

No. of nodes in right sub tree = 2(n-1/3)

Height of the tree = log

No. of nodes in left sub tree = 2 right sub tree

No. of nodes in left sub tree = (n-1/3)

No. of nodes in right sub tree = 2(n-1/3)

Height of the tree = log

_{3/2}nCorrect 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 = (n-1/3)

No. of nodes in right sub tree = 2(n-1/3)

Height of the tree = log

No. of nodes in left sub tree = 2 right sub tree

No. of nodes in left sub tree = (n-1/3)

No. of nodes in right sub tree = 2(n-1/3)

Height of the tree = log

_{3/2}n Subscribe

Login

0 Comments