Skip to content

Greedy Algorithm: milkshake

treeguard edited this page Dec 13, 2013 · 1 revision

I miss the condition for input.

  1. each customer will like at most one malted flavor.

so we can make use of this condition to employ the greedy algorithm. The initial value for flavors is unmalted. and we can see if the flavors can satisfy the customer or not and make corresponding changes.

Clone this wiki locally