Reputation:
I'm confused about the final image after a delete-max operation. When 87 is deleted does 48 get brought to the spot that 87 once held? Does the rest of the tree not change after?
Upvotes: 0
Views: 904
Reputation: 134125
No. 78 would be bubbled up to fill the spot that 87 once held.
You should read the original paper: Min-Max Heaps and Generalized Priority Queues: http://www.cs.otago.ac.nz/staffpriv/mike/Papers/MinMaxHeaps/MinMaxHeaps.pdf
Upvotes: 1