What is maximum number of nodes in a binary tree that has N levels, if the root level is zero?

This question was previously asked in
ESE Electronics 2014 Paper 2: Official Paper
View all UPSC IES Papers >
  1. 22N
  2. 2N+1 - 1
  3. 2N - 1 
  4. 2N - 2N

Answer (Detailed Solution Below)

Option 2 : 2N+1 - 1
Free
ST 1: UPSC ESE (IES) Civil - Building Materials
6.3 K Users
20 Questions 40 Marks 24 Mins

Detailed Solution

Download Solution PDF

A binary tree of 5 levels:

F1 Raju.S 18-11-20 Savita D1

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: 2- 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 = 22

Therefore, it is incorrect

Latest UPSC IES Updates

Last updated on May 28, 2025

->  UPSC ESE admit card 2025 for the prelims exam has been released. 

-> The UPSC IES Prelims 2025 will be held on 8th June 2025.

-> The selection process includes a Prelims and a Mains Examination, followed by a Personality Test/Interview.

-> Candidates should attempt the UPSC IES mock tests to increase their efficiency. The UPSC IES previous year papers can be downloaded here.

More Tree Questions

Get Free Access Now
Hot Links: teen patti master update teen patti 3a teen patti boss