// TOPIC
#greedy
2 articles
◆◆IntermediateAmazonGoogle
01The Merge Intervals Pattern
Sort by start, sweep and merge — the one instinct that cracks meeting rooms, calendar conflicts, and range overlap problems in O(n log n). Master the overlap test and you'll recognize this pattern before you finish reading the problem statement.
#intervals#sorting#greedy
10 min◆◆IntermediateGoogleAmazon
02Greedy Algorithms
Make the locally optimal choice and never look back — when greedy is correct it beats dynamic programming cold. The hard part isn't the algorithm, it's knowing when greed works and when it quietly hands you the wrong answer.
#greedy#algorithms#techniques
12 min