The root will be the only node at level 1.

Each subsequent levels will be as full as possible i.e. 2 nodes at level 2, 4 nodes at level 3 and so on, i.e. in general there will be 21-1 nodes at level 1. Therefore the number of nodes from level 1 through level h-1 will be
1+2+22+23+ ... +2h-2=2h-1-1

So,the number of nodes in a balanced binary tree of height 'h' is 2h-1-1.
--------------------------------------------------------
Human do error, please email:- webmaster@piyadas-world.com if you find any. Please visit http://www.piyadas-world.com for more resource.

0 comments