heapify refinement

explanation for the linear time