Mental Model
Greedy means making the best choice right now without worrying about the future. It works when these local best choices lead to the best overall solution.
Analogy: Imagine picking coins from a pile to get the most money. If you always pick the biggest coin first, you get the most money quickly. But if some coins are tricky, picking the biggest first might not give the best total.
Coins pile: 25 -> 10 -> 5 -> 1 -> null Pick biggest coin each time -> total grows fast But sometimes picking smaller coins first is better