1 1 vote Consider a binary min heap given below containing integer in [1, 15]. The maximum number of node movement on 5 successive removal of element are ________. Data Structures min binary-heap + – codingo1234 2.3k views answer comment Share Follow Print See all 13 Comments 13 13 Comments reply Hemanth_13 commented Nov 20, 2018 reply Follow flag 20? What's their solution 0 0 replyShare adarsh_1997 commented Nov 20, 2018 reply Follow flag 18? 0 0 replyShare `JEET commented Nov 20, 2018 reply Follow flag What is the way you proceeded in this question? 0 0 replyShare Hemanth_13 commented Nov 20, 2018 reply Follow flag It's how many times the rehepify method is called. 0 0 replyShare `JEET commented Nov 20, 2018 reply Follow flag 5 successive removal of element from the top or the bottom? 0 0 replyShare codingo1234 commented Nov 20, 2018 reply Follow flag 18 is correct but I want to ask that for example first deletion 1 would be removed and replaced by 15 so one movement and then we call minheapify at root so 15 would be replaced by 2 and so on but ,so now 15 and 2 will exchange places ,so how many node movements to take one or two? 0 0 replyShare adarsh_1997 commented Nov 20, 2018 reply Follow flag 1nd movement-> 15 replacing 1 2nd movement->15 replacing 2 3rd movement->15 replacing 3 4th movemnt ->15 replacing 4. so total 4 movemnt for one removal. follow this you will get 1 removal->4 mov 2nd removal->4 mov 3rd removal->3 mov 4th removal->4mov 5th removal->3 mov total mov->18 1 1 replyShare adarsh_1997 commented Nov 20, 2018 reply Follow flag @JEET use extract min 0 0 replyShare codingo1234 commented Nov 20, 2018 reply Follow flag @adarsh_1997 so exchange of places of 15 and 2 must be taken as one node movement? 0 0 replyShare `JEET commented Nov 20, 2018 reply Follow flag Adarsh can you please upload a pic of your solution. I would like to learn this. 0 0 replyShare adarsh_1997 commented Nov 20, 2018 reply Follow flag @codingo1234 yes 0 0 replyShare codingo1234 commented Nov 20, 2018 reply Follow flag kk thanks 0 0 replyShare scarz commented Jan 5, 2019 reply Follow flag replacing 2 and 15, that's two node movement aren't they? 0 0 replyShare Please log in or register to add a comment.