GATE CS 2002 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0248

The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is
  1. A
    n/2
  2. B
    \(\frac{(n-1)}{3}\)
  3. C
    \(\frac{(n-1)}{2}\)
  4. D
    \(\frac{(2n+1)}{3}\)

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/839/gate2002-2-9

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com