class Heap and function heapSort