HeapSort and MergeSort implemented