recategorized by
604 views
2 votes
2 votes

The height of a binary tree having $`\text{i’}$ nodes at level $`\text{i’}$ considering root to be at level $1$ is __________, where $`n\text{’}$ is the total no. of nodes in the tree.

  1. $O(\log n)$
  2. $(O(n)$
  3. $O(\sqrt{n})$
  4. $O(n^{2})$
recategorized by

1 Answer

Best answer
10 votes
10 votes

say n nodes are in binary tree.

1+2+3+4+...+i=n

   (i*(i+1)) / 2 = n

                i2=n

height is=O($\sqrt{n}$ )

selected by

Related questions

1 votes
1 votes
0 answers
1
Nandkishor3939 asked Jan 25, 2019
657 views
I think its answer is 8 .Please ,can any one make it sure for me :)
0 votes
0 votes
1 answer
2
Prince Sindhiya asked Jan 2, 2019
729 views
A full binary tree is a tree in which every node other than the leaves has two children. If there are 600 leaves then total number of leaf nodes are?
2 votes
2 votes
3 answers
3
4 votes
4 votes
2 answers
4
Parth Shah asked Dec 11, 2018
1,431 views
Suppose binary tree has only three nodes A,B and C, and you are given the post order traversal of tree as B-A-C . The exact pre order traversal of the tree is?A)C-A-BB)A-...