Min Heap
A min heap is a complete binary tree stored in an array. Every parent is less than or equal to its children, so the minimum sits at the root.
Costs
| Category | Data Structure |
| Difficulty | Medium |
| Peek minimum | O(1) |
| Insert | O(log n) |
| Extract minimum | O(log n) |
Questions
What is Min Heap?
A min heap is a complete binary tree stored in an array. Every parent is less than or equal to its children, so the minimum sits at the root.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.