853 views
1 votes
1 votes

The number of leaves (nodes with no children) in each left sub tree is within one of the number of leaves in the corresponding right sub tree. What is the worst case height of the tree ? Assume root node at level 0

  1.   O(log n)
  2.   n+1
  3.   n

is the question asling that number of leaves in LST of any node should be < numbe rof leaves in RST.if that is the case then it should be maximum 'n' height when we draw a skewed tree.

if its not the case,then what is question saying..??

Please log in or register to answer this question.

Related questions

2 votes
2 votes
1 answer
1
Akanksha Kesarwani asked Jan 15, 2016
8,021 views
What is the worst case possible height of an AVL tree??a. 2logn (Assume base of log is 2) b. 1.44log n (Assume base of log is 2)c. Depends upon implementationd. Thet...
1 votes
1 votes
0 answers
2
Rohit Gupta 8 asked Dec 25, 2017
1,109 views
If the average depth of a node in an $n$-node binary search tree is $O(\log{n})$, then the height of the tree is$O(n\log{n})$$O(n)$$O(\log{n})$$O(\sqrt(n\log{n}))$
2 votes
2 votes
2 answers
4
Amar Vashishth asked Aug 2, 2015
2,385 views
int fun(int n) { int count=0; for (int i= n; i 0; i/=2) for(int j=0; j< i; j++) count+= 1; return count; }