What is maximum number of nodes in a binary tree that has N level
![What is maximum number of nodes in a binary tree that has N level](http://storage.googleapis.com/tb-img/production/20/11/F1_Raju.S_18-11-20_Savita_D1.png)
| What is maximum number of nodes in a binary tree that has N levels, if the root level is zero?
A. 2<sup>2N</sup>
B. 2<sup>N+1</sup> - 1
C. 2<sup>N</sup> - 1
D. 2<sup>N</sup> - 2N
Please scroll down to see the correct answer and solution guide.
Right Answer is: B
SOLUTION
A binary tree of 5 levels:
The maximum number of nodes present is 63
Option 1: 22N
If N = 5 then the maximum nodes = 22N = 1024
Therefore, it is incorrect
Option 2: 2N+1 - 1
If N = 5 then the maximum nodes = 2N+1 - 1 = 63
Therefore, it is correct
Option 3: 2N - 1
If N = 5 then the maximum nodes = 2N - 1 = 31
Therefore, it is incorrect
Option 4: 2N - 2N
If N = 5 then the maximum nodes = 2N - 2N = 42
Therefore, it is incorrect