Question 11

Consider the following three binary trees, each with 7 nodes.

Consider the following three binary trees, each with 7 nodes. Tree A: root has a left child that is a leaf and a right child X; X has a left child Y and a right child that is a leaf; Y has two leaf children. Tree B: root has a left child L and a right child R; L has only a left child (a leaf); R has only a left child Z; Z has two leaf children. Tree C: root has two children, and each of them has two leaf children (a full tree of height 2). Then A is ______ binary tree, B is ______ binary tree and C is ______ binary tree.
  1. AStrictly, strictly, complete
  2. BComplete, not strictly, strictly
  3. CStrictly, not strictly, strictly
  4. DStrictly, not strictly, complete
Show answerHide answer

Correct answer: (D) Strictly, not strictly, complete

Explanation

Tree A is strictly binary because every node has 0 or 2 children. Tree B is not, because L and R each have only one child. Tree C is a full tree of height 2 with every level filled, so it is complete.

From DSSSB TGT Computer Science Practice Set 3

This is question 11 of DSSSB TGT Computer Science Practice Set 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.