Related Articles

Related Articles

GATE | GATE-CS-2015 (Set 1) | Question 65
  • Difficulty Level : Easy
  • Last Updated : 19 Feb, 2015

The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
(A) 63 and 6, respectively
(B) 64 and 5, respectively
(C) 32 and 6, respectively
(D) 31 and 5, respectively


Answer: (A)

Explanation:

Number of nodes is maximum for a perfect binary tree.
A perfect binary tree of height h has 2h+1 - 1 nodes

Number of nodes is minimum for a skewed binary tree.
A perfect binary tree of height h has h+1 nodes.


Quiz of this Question

sudo-gate-course

My Personal Notes arrow_drop_up
Recommended Articles
Page :