Greedy
Greedy algorithms make the locally optimal solution at each step hoping to find the globally optimal solution. They may not result in the best solution, sometimes, that is reserved for solutions using DP.
Greedy problems will have a place where the program evaluates what it classifies as “the best solution”, whether it be a weighted sum or a special function. But problems that can be solved with the greedy method will need repeating subproblems and a problem that can be broken down itself.
#programming #cs