Week 5 Discussion Forum

Why is it called greedy algorithm?

Why is it called greedy algorithm?

by Mizanur Rahman 192-15-2788 -
Number of replies: 0

Such algorithms are called greedy because while the optimal solution to each smaller instance will provide an immediate output, the algorithm doesn't consider the larger problem as a whole. Greedy algorithms work by recursively constructing a set of objects from the smallest possible constituent parts.

45 words