Review: Greedy Algorithms
l A greedy algorithm always makes the choice
that looks best at the moment
n The hope: a locally optimal choice will lead to a
globally optimal solution
n For some problems, it works
u Yes: fractional knapsack problem
u No: playing a bridge hand
l Dynamic programming can be overkill; greedy
algorithms tend to be easier to code