In general, there are two steps for heap sort which are heapify up and heapify down.
We call it 'sorting step'. In this method, we apply heap sort algorithm and BSA to sort the bound.
First, we generate two elements by the first element of the array in team of box. We call it 'generating step'. Next, we will use sorting step and then go to generating step and so on. We have three files to run this method:
AheapS is a MHS to prove the bound in Chapter 3. heapifydownN1 is heapify down. heapifyup1 is heapify up.