936 views
4 votes
4 votes
The number of distinct max heap are possible with keys 1, 2, 3, 4, 5 are ________.

2 Answers

4 votes
4 votes

Total ways to arrange data is in 5 nodes is 5!.

Divide it by 5 as we have 5 nodes in descendant in of root including itself. Similarity 3 in root left child as we have 3 descendant for it including itself.

Source : https://youtu.be/1U3loHkX5XE?t=2260 

0 votes
0 votes

Ans is 8

Related questions

2 votes
2 votes
1 answer
1
Thor-o-s asked Sep 1, 2022
415 views
Can anyone please explain how to find “ i “ smallest elements from an array whose elements are distinctPlease use max heap to explain the working input : n distinct e...
0 votes
0 votes
0 answers
4
iarnav asked Jun 24, 2018
266 views
The number of possible min-heaps containing each value from {1,1,1,1,1,1,1} exactly once is _______This is a variance of Gate 2018 question and how will we deal if all va...