in DS edited by
565 views
1 vote
1 vote

The number of possible binary trees with $4$ nodes is

  1. $12$
  2. $13$
  3. $14$
  4. $15$
in DS edited by
565 views

2 Answers

1 vote
1 vote

Since its not mentioned whether the nodes are labelled or not, so taking un-labelled nodes in general,

maximum number of binary trees = 2nCn / n+1 

This gives 14 binary trees which is option C

0 votes
0 votes

$\textit{There is one binary tree with one node. }$

$\textit{There are two differently shaped trees with two nodes. }$

$\textit{There are 14 different (shaped) binary trees with four nodes.}$

$\textit{These different trees are shown below.}$

 

Ref: https://courses.cs.duke.edu/fall03/cps100/assign/writtentree/

https://www.geeksforgeeks.org/total-number-of-possible-binary-search-trees-with-n-keys/

Answer:

Related questions