Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 2.65 KB

File metadata and controls

29 lines (20 loc) · 2.65 KB

Greedy

Theory

Greedy

Greedy algorithms are algorithms that make the best choice at each step in the hope that the best choice will lead to the global optimal solution. Greedy algorithms are used for optimization problems. An optimization problem can be solved using Greedy if the problem has the following two properties:

  1. Greedy Choice Property: A global optimal solution can be achieved by selecting a local optimal solution.
  2. Optimal Substructure: An optimal solution to the problem contains optimal solutions to the subproblems.

Greedy Implementation

Greedy algorithms are implemented using a greedy function that makes the best choice at each step. The greedy function is implemented using a greedy strategy. A greedy strategy is a general plan of action that a greedy algorithm uses to make the best choice at each step.

Problems

Category: Greedy Status: In Progress Author: David Bujosa