Heapify

Heapify[p]
builds a heap from permutation .

DetailsDetails