Computer Science EngineeringHardISRO SC (CS)

How many structurally distinct binary trees (left and right children distinguished) with exactly 5 nodes have height exactly 3 edges?

  1. A. 20
  2. B. 22
  3. C. 19
  4. D. 40

Correct answer: A. 20

Count with the recurrence over left-subtree sizes, then take (height <= 3) minus (height <= 2): 20.

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic