Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Data Structures | Binary Trees | Question 6

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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

(A)

1

(B)

5

(C)

4

(D)

3


Answer: (B)

Explanation:

Following are all possible unlabeled binary trees

             O
          /     \\
        O        O
           (i)

            O
          /
       O
     /
   O
        (ii)

         O
       /
     O
        \\
          O
       (iii)

  O
     \\
       O
          \\
           O
    (iv)

       O
          \\
            O
          /
       O
    (v)

Note that nodes are unlabeled. If the nodes are labeled, we get more trees. We can find the number of binary tree by Catalan numbers. Here n = 3 Number of binary tree = (2nCn)/ n+1 = (2*3C3)/ 3+1 = 5. So, option (B) is correct.


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 06 Sep, 2021
Like Article
Save Article
Similar Reads
Related Tutorials