recategorized by
850 views

1 Answer

Best answer
4 votes
4 votes

Given Set =  {12, 34, 22, 43, 13, 45, 55, 94, 99, 23}  with 45 as the root 

now make 2 sets ---------→  values less than root node elements ==> {12 , 34, 22 , 43, 13, 23}

                              ---------→ values greater than root node ==> { 55, 94, 99}

As we get size as 6 (values less than 45) and 3 (values greater than 45)

 

Formula to find number of possible binary search trees =     (2n)!

                                                                                                      -------------------------

                                                                                                        (n)! * (n+1)!

for n = 6 ===> (12!  / (6! * 7!) ) ==> 132

for n = 3 ===> (6! / (3! * 4!) ) ==> 5

final answer will be 132 * 5 ==> 660

selected by
Answer:

Related questions

1 votes
1 votes
1 answer
1
LRU asked Oct 4, 2021
500 views
Worst case time required to construct a balanced BST given a sorted array of integers which can be inserted in any order
1 votes
1 votes
1 answer
2
Sagar475 asked Jan 21, 2022
685 views
A min heap of size 2048 is stored on an array with array indices [1..2048] is stored and the minimum number of comparisons required to determine the maximum of element i...
2 votes
2 votes
1 answer
3
LRU asked Nov 3, 2021
843 views
The time required to determine the minimum element from the max heap of size O(log(n)) is given by
5 votes
5 votes
1 answer
4
LRU asked Nov 5, 2021
675 views
Given the following undirected graph, the cost of the minimal spanning tree of the graph is ____.