Question 9431 – Binary-search-tree
November 26, 2023
Question 9891 – Sorting
November 26, 2023
Question 9431 – Binary-search-tree
November 26, 2023
Question 9891 – Sorting
November 26, 2023

GATE 2005

Question 35

How many distinct binary search trees can be created out of 4 distinct keys?

A
5
B
14
C
24
D
42
Question 35 Explanation: 
There are 2nCn / (n+1) unlabeled trees are possible.
(or)

t(0)=1
t(1)=1
t(4) = t(0)t(3) + t(1)t(2) + t(2)t(1) + t(3)t(0)
= 5+2+2+5
= 14
(or)
8C4 / 5 = 14
Correct Answer: B
Question 35 Explanation: 
There are 2nCn / (n+1) unlabeled trees are possible.
(or)

t(0)=1
t(1)=1
t(4) = t(0)t(3) + t(1)t(2) + t(2)t(1) + t(3)t(0)
= 5+2+2+5
= 14
(or)
8C4 / 5 = 14
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x