Skip to content
Related Articles

Related Articles

Improve Article

GATE | Sudo GATE 2020 Mock II (10 January 2019) | Question 17

  • Last Updated : 09 Jan, 2020

Consider the following statements:

(I) Let T be a binary search tree with 4 height. The minimum and maximum possible nodes of T are 5 and 15 respectively.

(II) In a binary tree, the number of internal nodes of degree 2 is 6, and the number of internal nodes of degree 1 is 8. The number of leaf nodes in the binary tree is 15.


Which of the following statement(s) is/are correct ?
(A) Only (I)
(B) Only (II)
(C) Both (I) and (II)
(D) Neither (I) nor (II)


Answer: (D)

Explanation: (I) Let T be a binary search tree with 4 height. The minimum and maximum possible nodes of T are 5 and 31 respectively.

(II) In a binary tree, the number of leaf nodes is always 1 more than number of internal nodes with 2 children, refer http://www.geeksforgeeks.org/handshaking-lemma-and-interesting-tree-properties/
So,
Number of Leaf Nodes = Number of Internal nodes with 2 children + 1
Number of Leaf Nodes = 6 + 1
Number of Leaf Nodes = 7

So, neither statement (I) nor (II) is correct.

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :