Greedy Algorithms

Greedy algorithms are a class of algorithms that make locally optimal choices at each step with the hope of finding a global optimum. They are often used for optimization problems where the solution can be built incrementally by making a series of choices.

Maximun Swap

Maximum Swap

Candy

Candy