The Gateway to Computer Science Excellence
0 votes
98 views
Consider 4 labeled 1,2,3,4. The number of distinct binary tree possible such that whose inorder traversal is 1,2,3,4 are ........
in Programming by Loyal (6.8k points) | 98 views
0
it's  $\binom{2n}{n}$ / (n+1) = 14 right ??
+1

@Magma

yes, in each pattern we post the nodes as one way which give the inorder result as 1,2,3,4

0
0

hmm thanks  Shaik Masthan 

0
Thats the thing i also did C(2n,n)/(n+1)  but in made easy they have also multiplied by n! extra.

BST are by default labelled tree right i dont know why they multiplied by n! there.
0
If he did not strict to get in order $1,2,3,4$ then we can assign $4$ number in any order and get $4!$ combination,but in this question, it is not possible.

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,651 questions
56,214 answers
194,177 comments
95,439 users