Greedy algorithms
Overview
A greedy algorithm picks the locally best choice at each step hoping it leads to the global optimum.
Problems to practice
- Jump game
- Gas station
- Activity selection
- Assign cookies
- Minimum number of coins
- Meeting rooms
Rule
Greedy works only when the problem has the correct greedy choice property and optimal substructure.
Can you explain it without the notes?
Greedy algorithms
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
What it is
Turn this concept into a clear answer.
Practice this conceptAdapted from 14_DSA_MASTER.md · “12. Greedy algorithms”. Examples are study fragments; framework behavior can depend on your version.