34 贪心 Greedy
嘛,九章老师不推荐记这东西。但是呢,刷多了题,发现有些题还真得贪心才好做( ̄_, ̄ )
Greedy algorithms (来自leetcode)
Greedy problems usually look like "Find minimum number of something to do something" or "Find maximum number of something to fit in some conditions", and typically propose an unsorted input.
The idea of greedy algorithm is to pick the locally optimal move at each step, that will lead to the globally optimal solution.
1663 Smallest String With A Given Numeric Value
Last updated