edited by
1,042 views

1 Answer

Best answer
0 votes
0 votes
i think exact number of leaf nodes is somewhat hard here. what we can do is can find upper bound and lower bound .

upperbound - the greater function is n/2. so if we draw the tree of the function it will half full . for upperbound consider it to be fuly filled . and as n/2 is going till the end .

height of tree will be logn base 2 . taking only n/2 in consideration.
no . of leafs at height h =2^logn base 2 which will be equal to n.

lower bound . consider it fully filled by taking n/4 in consideration.

so no of leafs in that case = 2^logn base 4

n^0.5
no of nodes will be betwen n^0.5 to n .

Related questions

0 votes
0 votes
2 answers
1
sripo asked Dec 25, 2018
4,808 views
In a 3-array tree if internal nodes have exactly 3 children,the number of leaf nodes will be __ ?Does it vary for binary tree?What do you mean by internal nodes? Non roo...
0 votes
0 votes
1 answer
2
lucasbbs asked Feb 28, 2022
6,879 views
How do I apply the master theorem in the above recurrence? Please give details about which case and on hiow to solve the asymptotic analysis...
1 votes
1 votes
1 answer
3
sripo asked Nov 14, 2018
1,619 views
T(n)=T(n/2)+2; T(1)=1when n is power of 2 the correct expression for T(n) is:a) 2(logn+1)b) 2lognc)logn+1d)2logn+1
1 votes
1 votes
1 answer
4