Data Structures & AlgorithmsModerateGATE CS · ISRO Scientist

How many full binary trees (every node has 0 or 2 children) with n internal nodes are there for n = 10?

  1. A. 1024
  2. B. 16796
  3. C. 58786
  4. D. 167960

Correct answer: B. 16796

Use the closed-form count for this family: it follows from the standard counting argument (Cayley's formula, the Catalan recurrence, or Kirchhoff's matrix-tree theorem). Each distractor is a different formula that looks similar.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic