1,116 views
2 votes
2 votes
FIve nodes labelled 1,2,3,4,5 are used to construct different binary trees. How many such binary trees can be constructed whose preorder traversal is 1,2,3,4,5 ?

1 Answer

0 votes
0 votes
No. of binary trees for  a particular preorder/ionorde /postorder can be calculated using formula Cn=1n+1(2n n)

here n=5

so answer will be 42

Related questions

4 votes
4 votes
4 answers
1
Parshu gate asked Nov 27, 2017
6,956 views
How many different binary search trees can be constructed using six distinct keys? 256 128 132 264
3 votes
3 votes
5 answers
2
srestha asked May 22, 2019
1,906 views
Consider the following function height, to which pointer to the root node of a binary tree shown below is passedNote that max(a,b) defined by #define max(a,b) (a>b)?a:b.i...
4 votes
4 votes
5 answers
3
sripo asked Jan 16, 2019
6,899 views
Let us there are n nodes which are labelled.Then the number of trees possible is given by the Catalan Number i.e $\binom{2n}{n} / (n+1)$Then the binary search trees possi...
0 votes
0 votes
0 answers
4