UGC-NET Jul 2016 · Trees

MCQ · 2 marks · Problem PROG-DSTR-0006

The number of different binary trees with 6 nodes is
  1. A
    6
  2. B
    42
  3. C
    132
  4. D
    256

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

Show the worked solution\[\boxed{b_n=C_n=\frac{1}{n+1}\binom{2n}{n}}\]Choosing \(k\) nodes for the left subtree gives \(b_n=\sum_{k=0}^{n-1}b_k\,b_{n-1-k}\), the Catalan recurrence.\[b_6=\frac{1}{7}\binom{12}{6}=\frac{924}{7}=132.\]Answer: C

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