Always grab the min or max in O(log n) — essential for top-k and scheduling problems.
A heap keeps the minimum (or maximum) element accessible in O(1), with O(log n) insert and remove. It's the tool whenever you repeatedly need "the smallest/largest remaining item" without needing everything fully sorted.
Blind 75 (1):
More from Blind 150 (6):