Added trees for heaps in heapsort.