edited by
874 views

2 Answers

Best answer
4 votes
4 votes

This is based on standard result also known as Catalan number :

a) Number of BSTs(binary search trees in which position of keys matter) = Number of unlabelled binary trees of n vertices

                                                                                                          = 2nCn / (n+1)..

    As in the case of labelled binary trees , the order of keys do not matter , so they can be arranged in any way                                                                                                So number of binary trees = Number of unlabelled binary trees of n vertices * n!

                                                                                                           =  2nCn / (n+1) * n!

    Here  n  =  3,

    So , number of labelled binary trees                                                   = ( 6C3 / 4 ) * 3!

                                                                                                           = 5 * 6

                                                                                                           = 30

   Hence 30 should be the correct answer.. 

selected by
2 votes
2 votes

Just in sir's answer, about labelled and unlabelled binary trees.

Related questions

0 votes
0 votes
1 answer
2
Prince Sindhiya asked Jan 2, 2019
732 views
A full binary tree is a tree in which every node other than the leaves has two children. If there are 600 leaves then total number of leaf nodes are?
2 votes
2 votes
3 answers
3
4 votes
4 votes
2 answers
4
Parth Shah asked Dec 11, 2018
1,438 views
Suppose binary tree has only three nodes A,B and C, and you are given the post order traversal of tree as B-A-C . The exact pre order traversal of the tree is?A)C-A-BB)A-...