394 views
1 votes
1 votes
the number of min heap trees possible with 15 elements such that every leaf node must be greater than all non leaf of the tree are

1 Answer

Best answer
2 votes
2 votes

There are 15 nodes in the min-heap, there are 7 internal nodes and 8 leaf nodes. suppose keys are 1, 2, 3, ........ 15
1 to 7 are internal nodes and 8 to 15 are leaf nodes.

there are 4 levels in the tree, and following are the possible min-heap trees:


 

 First Case:  2!*4!*8!1935360

Second Case: 8!*(4!-3!*2)2!

Third case: 8!*(2!*2!)*2!

Total: first case + second case + third case = 3225600

selected

Related questions

0 votes
0 votes
1 answer
2
kickassakash asked Jul 4, 2023
397 views
I have specific doubt on this question and I’ve tried to explain that in the picture ,If anyone can explain it then it’ll be of great help. according to sachin sir th...
0 votes
0 votes
1 answer
3
Souvik33 asked Apr 2, 2023
410 views
There are Insert and Retrieve_Max operations on a set {}. for n such operations what is the time complexity of the efficient algorithm possible?$n^{2}$nlogn n logn
0 votes
0 votes
1 answer
4
Souvik33 asked Nov 2, 2022
840 views
Which data structure would be most appropriate to implement a collection of values with the following 3 characteristicsSingly link list with head and tail pointerDoubly l...