##### Possible no. of BST's from given no. of nodes

Pls explain how to find these!!

Q1. Find the number of trees that are possible, if we construct a BST by successively inserting 5 distinct items into an initially empty tree.

And

Q2. The binary tree can be created out of 5 distinct nodes are??

I am getting 120 and (120)^{2} applying my tiny brain!! Pls explain where i am makiing mistake??

It should be 42...By applying formula...

2nCn/n+1http://www.techtud.com/preparation/trees

answer of Que1 and Que2 is 42

first one is correct but second one's answer is 5040..

Pls explain how to find?? (pls no more formulas).......

@dashish

If nodes are labeled then answer is 5040(calculating 42*5!)

Distinct nodes are mentioned therefore 5040

@shraddhagami

Pls also explain the first one.. How is it comming?? how 2nCn/n+1??

@dashish

No. Of binary search tree is same as No. Of binary tree with unlabeled n nodes.(if nodes are distinct in BST)

I need to know about the first one (Q1).. where order is fixed!.....

If order is fixed then only 1 tree is possible.

order is fixed but numbers are not fixed!!