The initial array given was suppose 16,14,28,10,12,27,15. We create a max heap now. Then it becomes 28,14,27,10,12,16,15.
Now apply extract_Max --> we swap 28(root node) with the last leaf node(15).
Array becomes -> 15,14,27,10,12,16,28.
So 28 gets the last index and apply Maxheapify on 15(now the root node).
Now the array becomes 27,14,15,10,12,16.
Again apply extract_Max --> we swap 27(root node) with the last leaf node(16).
Now array looks like 16,14,15,10,12,27,28.
Okay..i think only one Maxheapify function is enough.