What is the number of distinct binary search trees that can be formed using the integers between 1 and n, for a natural number n? The answer should of the form C(p,q) for some integers p and q. Just to make the answer concrete, post the value for n=11.
Binary Search Tree(BST) is a binary tree with the constraint that for every node, all the elements to its left are lesser than the node and all the elements to its right are greater than the node.
Eg: If the answer is BST(n), then BST(1)=1, BST(2)=2, BST(3)=5
Wednesday, December 20, 2006
Problem0001: Binary Search Trees
Labels:
binary search tree,
combinations,
counting,
permutations,
problem,
puzzle
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment