wrote Heapsort with heap, and Heapsort with loop