Counting number of binary trees with given node values and root

53 Views Asked by At

I came across following problem:

Find number of binary trees possible with 2 as roots. Nodes={1,2,3,4,5}

There was no solution given. I knew number of binary trees for given preorder is given by Catalan number as $\frac{1}{n+1}\binom{2n}{n}$, where $n$ is number of nodes. So does the above question same as asking: how many binary trees are possible for all preorders starting with 2? If yes, does the answer is $\frac{1}{n+1}\binom{2n}{n}\times 4! = 336$ as there are $4!$ pre orderes starting with 2.