Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE-CS-2015 (Set 1) | Question 65

Improve Article
Save Article
Like Article
  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

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

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!