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 ? Ashwani Kumar 2 asked Dec 9, 2016 Ashwani Kumar 2 1.1k views answer comment Share Follow See 1 comment See all 1 1 comment reply Habibkhan commented Dec 9, 2016 reply Follow Share It should be 42.. Plz check : http://cs.stackexchange.com/questions/55683/how-many-number-of-different-binary-trees-are-possible-for-a-given-postorder-or 1 votes 1 votes Please log in or register to add a comment.
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 sandeepjkh answered Aug 30, 2017 sandeepjkh comment Share Follow See all 2 Comments See all 2 2 Comments reply Ashwani Kumar 2 commented Aug 30, 2017 reply Follow Share What is the formula and it came ? 0 votes 0 votes SaurabhKatkar commented Dec 21, 2019 reply Follow Share It is the nth Catalan number i.e Cn = (2n)! / ((n + 1)!n!) 0 votes 0 votes Please log in or register to add a comment.