Greedy algorithm
A greedy algorithm builds a solution by repeatedly choosing the locally best available option, without revisiting earlier choices. It produces a global optimum only for problems whose structure supports that strategy.
A greedy algorithm builds a solution by repeatedly choosing the locally best available option, without revisiting earlier choices. It produces a global optimum only for problems whose structure supports that strategy.