Original Heap


After swapping root into last position

After Re-heapify

Swap again the current root element with last position & re-Heapify

Repeat Process again

Repeat Process again


Repeat Process


Repeat Process .....last time!

 

© Lynne Grewe