- A greedy algorithm is a mathematical process that looks for simple, easy-to-implement solutions to
- complex, multi-step problems by deciding which next step will provide the most obvious benefit.
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. Once a decision has been made, it is never reconsidered