Skip to content
Official PYQ · 1987

GATE CS 1987 Q2g — Trees

Explain with AI
State whether the following statements are TRUE or FALSE:

If the number of leaves in a tree is not a power of 2,2, then the tree is not a binary tree.
View worked solution

Answer: 0

The given statement is FALSE (represented as 0).

A binary tree is defined as a tree structure where each node has at most two children. There is no restriction on the number of leaf nodes being a power of 22.

Counterexample:

Consider the following binary tree:

      A
     / \
    B   C
   / \
  D   E

In this tree:

  • The leaf nodes are CC, DD, and EE.
  • The total number of leaves is 33, which is not a power of 22 (2k2^k).
  • Every node has at most 22 children, making it a valid binary tree.

Since we have a valid binary tree with 33 leaves, the statement "If the number of leaves in a tree is not a power of 22, then the tree is not a binary tree" is false.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Trees questions