Create heapsort