Heapify
Sift-down heapify for one node is O(log n).
Bottom-up construction of a heap is O(n).
Heapify does not mean sorting the array.
After heapify, the heap-order property is restored.
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.