what do you mean by greedy algorithm code example Example: greedy algorithm greedy algorithm: makes the optimal choice at each step