Data Structures & AlgorithmsHardGATE CS · ISRO Scientist

How many structurally different binary trees with n nodes (shape only, labels ignored) are there for n = 9?

  1. A. 4862
  2. B. 48620
  3. C. 362880
  4. D. 512

Correct answer: A. 4862

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