Heap (Priority Queue)

Covers heap fundamentals, top-K problems, streaming data, greedy optimizations, and advanced 2D heap applications.

Filter by difficulty:
Heap Basics
•
Implement Min/Max Heap Easy
•
Heap Sort (Sort an array using Heap) Medium
Kth Element & Streaming
•
Median of Data Stream Hard
•
Kth Largest Element in an Array Medium
•
Kth Largest Element in a Stream Easy
•
Kth Smallest Element in a Sorted Matrix Medium
Greedy + Heap
•
K Pairs with Smallest Sum from Two Arrays Medium
•
Pick at most K Projects to Maximize Capital Hard
Advanced Heap (2D / BFS + Heap)
•
Trapping Rain Water II (2D Grid) Hard
•
The Skyline Problem Hard