Delete a heapsort bug: You should always pass length-1 to siftdown function in heapify.