What is the number of different binary trees and Binary search trees that can be formed from n nodes? Pls Note : 1) I am asking for Binary trees and not full Binary trees (in which case the answer is Catalan(n))? 2) In case of BST's again pls include all the cases (including linear chains)
I think (expect) that Ans1 = Ans 2 * factorial (n), as each structure would only entail a single arrangement of keys as per BST ordering