Log In
0 votes
A weight balanced tree is a binary tree in which for each node, the no. of nodes in the left sub tree is atleast half and at most twice the no. of nodes in the right sub tree. The maximum possible height of such a tree with n nodes is best described by which of the following?
(a) log2 n                        (b) log4/3 n
(c) log3 n                        (d) log3/2 n
closed as a duplicate of: GATE2002-2.12
in DS
closed by

Related questions

0 votes
1 answer
Consider the following function foobar(), which takes binary tree as input. int foobar(struct node *root){ if(!root) return 0; if((!root->left)&&(!root->right)) return 10; else{ int i=foobar(root->left); int j=foobar(root->right); return i+j; } } What does the above ... tree. $B)$ Number of leaves in binary tree $C)$ Sum of leaves node of binary tree. $D)$ None What return $10$ actually means?
asked May 4, 2019 in DS srestha 143 views
0 votes
1 answer
Consider the following function with a binary tree with atleast one node: int path(struct node *x, int len){ if(x==NULL) return B; else return A; } Assume the above function is used to check the given binary tree has any path with specified length from root to the leaf node . Let $T$ ... $B$ is $(len== -1)$ which of these two option correct? Please Explain.
asked Apr 30, 2019 in DS srestha 234 views
0 votes
0 answers
I think its answer is 8 .Please ,can any one make it sure for me :)
asked Jan 25, 2019 in DS Nandkishor3939 188 views
1 vote
1 answer
AVL tree is created by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order (Assume the tree is initially empty). Then the level order traversals of the tree would be. 2, 1, 3, 5, 4, 6, 7 3, 2, 5, 1, 6, 4, 7 2, 1, 3, 4, 5 ... even after knowing all the concepts. After 2 or 3 rotations I get stuck trying to figure out which way to rotate. Please help me with the proper steps in this question.
asked Jan 6, 2019 in DS Gupta731 301 views