.
In the case of an ideal binary tree, the
total number of leaf nodes is 2 ^ H (H = tree height)
and the total number of internal nodes 2 ^ H - 1
Consequently, the total number of nodes will be 2 ^ H + 2 ^ H - 1 , which is 2 ^ (H + 1) - 1 , as mentioned by others.
Hope this helps.
source
share