Day 15 - Greedy AlgorithmsOverview

Day 15 — Greedy Algorithms

This chapter is being written. Check back soon!

What you’ll learn here

  • The greedy choice property — why “always pick the locally best option” sometimes works (and sometimes doesn’t)
  • Classic problems: activity selection, fractional knapsack, Huffman coding, interval scheduling
  • How to prove a greedy algorithm is correct (exchange argument, induction)
  • Greedy vs DP — recognizing when each applies, and the cost of getting it wrong

If Day 14 — Dynamic Programming is “try every option and pick the best,” greedy is “just take the best-looking move right now.” Much faster when it works.