Greedy algorithms are algorithms that always make the choice that looks best at the moment — it makes a locally optimal choice hoping that leads to a globally optimal solution.

They’re generally fast but often don’t get the best solution. Smarter greedy algorithms use a guess of what may happen in the future to make a better decision.