9 votes 9 votes The number of min heap trees are possible with 13 elements such that every leaf node must be greater than all non-leaf nodes of the tree are ___ A. 627 B. 747 C. 657 D. 757 Programming in C test-series + – diksha kahensa asked Jan 6, 2017 diksha kahensa 1.4k views answer comment Share Follow See 1 comment See all 1 1 comment reply Neha24 commented Jan 5 reply Follow Share @GO Classes What’s the correct ans of this question? Is it 7!*5C3*2C1*1 or 747? pls help 0 votes 0 votes Please log in or register to add a comment.
Best answer 15 votes 15 votes The number of min heap trees are possible with 13 elements such that every leaf node must be greater than all non-leaf nodes of the tree are $_{3}^{5}\textrm{C} \times 2! * 7!$ dd answered Jan 9, 2017 selected Jan 9, 2017 by pC dd comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes 1st level : 1 node => 1! ways 2nd level: 2 node => 2! ways 3rd level : 4 node => 4! ways 4th level: 6 node => P(8,6) ways So, number of Min Heaps are = 1!*2!*4!*P(8,6) = 672 Please cross ckeck ! Abhijit Borah answered Jan 7, 2017 Abhijit Borah comment Share Follow See all 20 Comments See all 20 20 Comments reply Show 17 previous comments dd commented Jan 9, 2017 reply Follow Share I guess you are talking about total possible heaps with 7 elements.. https://www.quora.com/How-many-Binary-heaps-can-be-made-from-N-distinct-elements 1 votes 1 votes dd commented Jan 9, 2017 reply Follow Share ........................ 1 votes 1 votes pC commented Jan 9, 2017 reply Follow Share infinte upvotes for this diagram . Never thought of this senario. Thanks for correcting me :) 1 votes 1 votes Please log in or register to add a comment.