https://www.geeksforgeeks.org/relationship-number-nodes-height-binary-tree/

If there are n nodes in a binary tree, **the maximum height** of the binary tree is **n-1** and **minimum height** is **$\left \lfloor log\ 2n \right \rfloor$ **.

0 votes

Answer 9

3

https://www.geeksforgeeks.org/relationship-number-nodes-height-binary-tree/

If there are n nodes in a binary tree, **the maximum height** of the binary tree is **n-1** and **minimum height** is **$\left \lfloor log\ 2n \right \rfloor$ **.

1 vote

Read carefully what it is saying :- The height of a binary tree is defined as **the number of nodes in the longest path from root to the leaf** node. i.e. if node is 3 with (height 2) then height = 3 (a/c to question).

basically it is saying with node = 1 height = 1.

now, for complete binary tree h= ceil(log(n+1)-1) [with height starting from h=0 with node=1.]

ceil(log(256+1)-1=8

hence for this question 8+1= 9.