The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height h is:
(A) 2^h -1
(B) 2^(h-1) – 1
(C) 2^(h+1) -1
(D) 2*(h+1)
Answer: (C)
Explanation: Maximum number of nodes will be there for a complete tree.
Number of nodes in a complete tree of height h = 1 + 2 + 2^2 + 2*3 + …. 2^h = 2^(h+1) – 1
Quiz of this Question
Recommended Posts:
- Introduction to Data Structures | 10 most commonly used Data Structures
- Data Structures | Binary Trees | Question 1
- Data Structures | Binary Trees | Question 15
- Data Structures | Binary Trees | Question 3
- Data Structures | Binary Trees | Question 15
- Data Structures | Binary Trees | Question 6
- Data Structures | Binary Search Trees | Question 1
- Data Structures | Binary Search Trees | Question 2
- Data Structures | Balanced Binary Search Trees | Question 2
- Data Structures | Binary Search Trees | Question 3
- Data Structures | Binary Search Trees | Question 4
- Data Structures | Binary Search Trees | Question 5
- Data Structures | Balanced Binary Search Trees | Question 2
- Data Structures | Binary Trees | Question 8
- Data Structures | Binary Trees | Question 9
- Data Structures | Binary Trees | Question 10
- Data Structures | Binary Search Trees | Question 6
- Data Structures | Binary Trees | Question 12
- Data Structures | Binary Trees | Question 13
- Data Structures | Binary Search Trees | Question 7

