StreakPeaked· Practice

ExamsGATETechnical

The maximum number of binary trees that can be formed with three unlabeled nodes is:

  1. 1
  2. 5
  3. 4
  4. 3

Correct answer: 5

Solution

The number of distinct binary tree shapes with $n$ unlabeled nodes is the $n$th Catalan number. For $n=3$, the Catalan number is 5, so there are 5 possible binary trees.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →