# # Binary tree [closed]

105 views
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

## Related questions

1
143 views
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?
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.