|
|
|
|
|
by Negitivefrags
504 days ago
|
|
This isn't really what the article is about, but I don't think that the term "Greedy algorithm" means what the author thinks. Greedy algorithms are about making locally optimal choices. They are not "brute force" algorithms or inefficient ones. In fact, greedy algorithms are almost always faster. They are faster because they consider only local information instead of the entire data set. In exchange for that, a greedy algorithm may produce non-optimal answers. |
|
I think of change making algorithm when working retail. Greedy is you always use the largest coin you can, and then the next largest and so on. It works with sensible coin denominations but there are sets of coins where the greedy algorithm is not optimal.