Min-Max heap delete max element

907 Views Asked by At

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?

Min-max heap original

1

There are 1 best solutions below

0
On

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