Loading…
Every greedy problem we index, grouped by the curriculum module that teaches its pattern. Each problem ships with multiple approaches, complexity analysis, and a line-by-line walkthrough in Java and Python.
Grouped by curriculum module
Greedy guide
Overview
Greedy is making the locally optimal choice and proving it stays globally optimal, and it shows up regularly in technical interviews. Greedy questions test whether you can find the right ordering/choice and argue why it's safe.
Our library indexes 22 Greedy problems (11 easy, 11 medium, 0 hard), each solved brute-force → optimal in Java and Python with a line-by-line walkthrough and interview talking points. They're grouped below by the curriculum module that teaches the underlying pattern, so related problems reinforce one another.
If you remember one thing about Greedy, make it this: Greedy works only when a local choice provably never blocks the global optimum — always sanity-check with a counterexample. Once that clicks, the signature patterns — sort + pick, exchange argument, interval scheduling — start to feel like a checklist you run on every new problem.
Study playbook
Common pitfalls
Frequently asked
Keep exploring