leaps.ggTRACK YOUR MASTERY →
PROBLEMS/GREEDY

Greedy LeetCode Problems

319 hand-tagged Greedy problems across 5 interview patterns (Sorting-Based Greedy, Reachability / Frontier Greedy, Exchange Argument / Local Adjustment, Counter / Balance Greedy, General Greedy (Greedy is main insight)), ranked by importance (how often each pattern shows up in real coding interviews). Work top-down within each pattern.

Sorting-Based Greedy

94 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Two City SchedulingEasy134878
Sorting + Comparison
2Hand of StraightsMedium156576
Frequency Counting / Hash Map Lookup · Sorting + Comparison
3Put Marbles in BagsHard204268
Sorting + Comparison · Prefix Sums
4Largest NumberMedium153862
Sorting + Comparison
5Queue Reconstruction by HeightMedium165862
Sorting + Comparison
+ 89 more Sorting-Based Greedy problems →

Reachability / Frontier Greedy

11 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Jump GameEasy130786
Linear Recurrence DP
2Jump Game IIMedium143286
Linear Recurrence DP
3Gas StationMedium157682
Prefix Sums
4Eliminate Maximum Number of MonstersMedium152872
Sorting + Comparison
5Minimum Number of Coins to be AddedMedium178472
Sorting + Comparison · Prefix Sums
+ 6 more Reachability / Frontier Greedy problems →

Exchange Argument / Local Adjustment

14 problems →
#PROBLEMDIFFELOIMPPATTERNS
1CandyMedium170078
2Minimize Maximum Pair Sum in ArrayEasy130162
Sorting + Comparison · Opposite-Direction (Converging)
3Minimum Deletions to Make Character Frequencies UniqueMedium151062
Frequency Counting / Hash Map Lookup · Sorting + Comparison
4Minimum Time to Make Rope ColorfulMedium157462
Same-Direction (Fast/Slow on Arrays)
5Minimum Increment to Make Array UniqueMedium144858
Sorting + Comparison
+ 9 more Exchange Argument / Local Adjustment problems →

Counter / Balance Greedy

8 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Valid Parenthesis StringMedium153078
Stack-Based Simulation · Linear Recurrence DP
2Minimum Number of Swaps to Make the String BalancedMedium168963
Stack-Based Simulation
3Check if a Parentheses String Can Be ValidHard203862
Stack-Based Simulation · Frequency Counting / Hash Map Lookup
4Optimal Partition of StringEasy135561
Frequency Counting / Hash Map Lookup · Variable-Size Window (Expand/Contract)
5Dota2 SenateMedium163958
Stack-Based Simulation
+ 3 more Counter / Balance Greedy problems →

General Greedy (Greedy is main insight)

192 problems →
#PROBLEMDIFFELOIMPPATTERNS
1Best Time to Buy and Sell Stock IIEasy119782
Linear Recurrence DP
2Lemonade ChangeEasy128672
Frequency Counting / Hash Map Lookup
3Increasing Triplet SubsequenceEasy137768
Longest Increasing Subsequence
4Merge Triplets to Form Target TripletMedium163668
5Find the CelebrityPREMIUMEasy134762
DFS Connected Components · Frequency Counting / Hash Map Lookup
+ 187 more General Greedy (Greedy is main insight) 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 Greedy 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 →