0Pricing
Competitive Programming Academy · Lesson

The Greedy Mindset

Pick the best step and never look back.

What Greedy Means

A greedy algorithm builds an answer step by step, always grabbing the choice that looks best right now and never undoing it later. ⚡

Pick the Best Step

At every moment you ask one thing: which single option helps most locally? You take it, then move on to the next decision.

All lessons in this course

  1. The Greedy Mindset
  2. Activity Selection by Earliest Finish
  3. Fractional Knapsack by Ratio
  4. Spot When Greedy Fails
← Back to Competitive Programming Academy