Greedy
Locally optimal choices that provably never need regretting.
0 of 5 lessons complete · 114 min total
- Greedy & the Exchange ArgumentWhy some problems allow committing to the best local choice — the exchange argument that proves it — and the counter-signals ('count the ways', interacting choices) that mean DP instead. Includes Kadane's extend-or-restart.Lesson · 16 minNot completed
- Proof by SwapSeeing why greedy never loses.Animation · 10 minNot completed
- Practice: Reach & ResetKadane's, furthest-reach jumping, layered jump counting, and the reset-on-negative gas loop.medium×44 problems · 0 solvedPractice · 40 minNot completed
- Practice: Clever CommitmentsBuilding runs from the smallest card, filtered triplet merging, last-occurrence partitioning, and min/max open-paren ranges.medium×44 problems · 0 solvedPractice · 40 minNot completed
- Greedy CheckpointGreedy vs DP discrimination, sort-key choices, and exchange-argument reasoning.Checkpoint · 8 minNot completed