-
We are given a set of n distinct elements and an unlabelled binary tree with n nodes. In how ways can we populate the tree with the given set so that it becomes a binary search tree?
-
- 0
- 1
- n!
-
1 2nCn n + 1
- 0
Correct Option: B
It is stated that there is a binary tree and we have populate the tree with n elements. Sorting the n elements in the increasing order,and placing them in the inorder traversal nodes of the binary tree makes it only BST possible.