[Classic Algorithm] Greedy Algorithm

The greedy algorithm, as the name suggests, is to make the current optimal choice.

That is, it is expected that through local optimal selection,

Get the best overall choice.

For example: How can we get the most value from 30 banknotes of different denominations? We only need to choose the largest denomination among the remaining banknotes every time, and what we get in the end is the optimal solution. This is the greedy algorithm.

おすすめ

転載: blog.csdn.net/weixin_41989013/article/details/133784676