0 votes 0 votes no of max heaps possible with nos given as 1,2,3,4,5? I am getting 8 if you get more please upload solution and do not give direct answers! Algorithms algorithms max-heap + – Dheer asked Nov 22, 2018 Dheer 346 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply goxul commented Nov 22, 2018 reply Follow Share I am also getting 8. We know that the position of 5 is fixed, so we only have to arrange the rest. Now, if we fix 4 as the left child of 5, we'll get 6 trees (as there are 3 positions to be filled and we have 3 elements). Now, if we fix 3 as the left child, then 4 has to go on the right. So now, we have only two positions to be filled and we'll get two trees each for that. So in total, eight trees. 0 votes 0 votes Dheer commented Nov 22, 2018 reply Follow Share So 3! *2! ? Right? How to solve if more nos are given? @goxul? 0 votes 0 votes Shaik Masthan commented Nov 22, 2018 reply Follow Share https://gateoverflow.in/204121/gate2018-46 0 votes 0 votes goxul commented Nov 22, 2018 reply Follow Share 3!*2! will give you 12, not 8. 0 votes 0 votes Please log in or register to add a comment.