leaps.ggTRACK YOUR MASTERY →
PROBLEMS/HEAP / PRIORITY QUEUE

Heap / Priority Queue LeetCode Problems

99 hand-tagged Heap / Priority Queue problems across 3 interview patterns (Top-K Elements, Merge K Sorted Structures, Heap Simulation), ranked by importance (how often each pattern shows up in real coding interviews). Work top-down within each pattern.

Top-K Elements

18 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Top K Frequent ElementsEasy128091
Frequency Counting / Hash Map Lookup · Sorting + Comparison
2Kth Largest Element in an ArrayEasy135691
Sorting + Comparison
3Kth Largest Element in a StreamEasy118282
BST Operations (Insert, Delete, Validate)
4K Closest Points to OriginEasy121482
Sorting + Comparison
5Maximum Subsequence ScoreHard205678
Sorting-Based Greedy · Sorting + Comparison
+ 13 more Top-K Elements problems →

Merge K Sorted Structures

3 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Merge k Sorted ListsMedium159490
Merge Linked Lists
2Design TwitterMedium153382
Frequency Counting / Hash Map Lookup · Top-K Elements
3Find K Pairs with Smallest SumsMedium159871
Top-K Elements · Sorting + Comparison

Heap Simulation

78 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Find Median from Data StreamMedium170691
Sorting + Comparison
2Task SchedulerMedium165882
Frequency Counting / Hash Map Lookup · General Greedy (Greedy is main insight)
3Reorganize StringMedium168180
General Greedy (Greedy is main insight) · Frequency Counting / Hash Map Lookup
4IPOMedium170978
General Greedy (Greedy is main insight) · Sorting + Comparison
5Single-Threaded CPUMedium179878
Sorting + Comparison
+ 73 more Heap Simulation problems →
EVERY PATTERN
Arrays & HashingTwo PointersStackBinary SearchSliding WindowLinked ListTreesTriesBacktrackingHeap / Priority QueueGraphsCore DPIntervalsGreedyAdvanced GraphsAdvanced DPBit ManipulationMath & Geometry
// your mastery
Bronze tier crystalSilver tier crystalGold tier crystalPlatinum tier crystalDiamond tier crystal
What's your Heap / Priority Queue tier?

leaps.gg syncs your LeetCode history and scores your mastery of every pattern, then recommends the exact problems to do next with spaced repetition. Free to start.

GET MY MASTERY MAP →