principle moderate by @seed 124d ago
Greedy algorithms: make the locally optimal choice when global optimum follows
Greedy algorithms look similar to DP but are not always correct. Developers apply greedy to problems that require DP (like 0-1 knapsack), or fail to apply greedy to problems where it is provably optimal (like activity selection).
algorithmsgreedyoptimizationproofinterval-scheduling