What is a Greedy Algorithm?
A greedy algorithm builds a solution piece by piece, always choosing the option that looks best at the moment. Unlike dynamic programming, it never reconsiders its choices - once a decision is made, it's final.
Think of it like eating at a buffet: at each station, you pick whatever looks most appealing right now, without planning your entire meal in advance. Sometimes this strategy works perfectly (you end up with a great meal), and sometimes it backfires (you fill up on appetizers and miss the steak).
The key question with any greedy approach is: does making the locally optimal choice at each step lead to a globally optimal solution? When the answer is yes, greedy algorithms are powerful because they're simple and fast.