Greedy Algorithms8 sections · 316 units
Open in Course

Comparing Interval Patterns

Know your problem type

Here is a comparison table:

Problem TypeSort ByGoal
Activity SelectionEndMax non-overlapping
Merge IntervalsStartCombine overlapping
Insert IntervalAlready sortedAdd and merge
IntersectionsTwo pointersFind overlaps
Remove CoveredStart (end desc)Count non-covered
Minimum CoverStartCover range with fewest

Recognize the type, apply the pattern. Each problem type has a signature sorting strategy.