[DAY17]Greedy Florist

Sherlock Chiou
1 min readOct 20, 2019

--

Solution: Greedy method. We would assign the flower to the people from the highest to the lowest price. Next trick is we would assign the flower to the person with the least number of flowers assigned before. Finally, we would need to sort the given c array first. :D

--

--

Sherlock Chiou
Sherlock Chiou

Written by Sherlock Chiou

Be Effective and Optimize for Learning

No responses yet