0 votes 0 votes The number of ways 1,2,3,4,5 can be inserted into binary heap such that the resultant binary heap is max heap A_i_$_h asked Sep 17, 2017 A_i_$_h 468 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Hemant Parihar commented Sep 17, 2017 reply Follow Share @Aish, 4 more. You can exchange the last level to get 2 more. 1 votes 1 votes A_i_$_h commented Sep 17, 2017 reply Follow Share so any specific formula or just find by brute force? 0 votes 0 votes just_bhavana commented Sep 18, 2017 reply Follow Share I don't think there's any formula, you'll have to draw the heaps accordingly 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes fIrst th eheap should be constructed afer that we have check whether it is max heap or not by examining the root value and it requires 3 times to swap root element to make it a max heap saipriyab answered Sep 17, 2017 saipriyab comment Share Follow See all 0 reply Please log in or register to add a comment.