Data Structures | Binary Trees | Question 6

The maximum number of binary trees that can be formed with three unlabeled 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 number of trees.



My Personal Notes arrow_drop_up



Practice Tags :

Recommended Posts:



1 Average Difficulty : 1/5.0
Based on 1 vote(s)






User Actions