GATE | GATE CS 2011 | Question 29
We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?
(A) 0
(B) 1
(C) n!
(D) (1/(n+1)).2nCn
Answer: (B)
Explanation: See https://www.geeksforgeeks.org/data-structures-and-algorithms-set-26/
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 2011 | Question 18
- GATE | GATE CS 2011 | Question 19
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 21
- GATE | GATE CS 2011 | Question 22
- GATE | GATE CS 2011 | Question 23
- GATE | GATE CS 2011 | Question 24
- GATE | GATE CS 2011 | Question 25
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 27
- GATE | GATE CS 2011 | Question 28
- GATE | GATE CS 2011 | Question 30
- GATE | GATE CS 2011 | Question 31
- GATE | GATE CS 2011 | Question 32
- GATE | GATE CS 2011 | Question 17

