Heap Operations
Heapify walks the array from the middle backward and sifts each subtree down. That build is linear, which is tighter than inserting n items one by one.
Costs
| Category | Algorithm |
| Difficulty | Medium |
| Build a heap | O(n) |
| Sift up or sift down | O(log n) |
| Insert n items one by one | O(n log n) |
Questions
What is Heap Operations?
Heapify walks the array from the middle backward and sifts each subtree down. That build is linear, which is tighter than inserting n items one by one.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.