Heapsort

General Heapsort Algorithm

 * 1) Build a heap out of the input data
 * 2) Remove the elements from heap and append them to a sorted array one at a time, restructuring the heap in between each removal