Week 5 Discussion Forum

How do you use greedy algorithm?

How do you use greedy algorithm?

by MD.Hamim Hossen -
Number of replies: 0

To make a greedy algorithm, identify an optimal substructure or subproblem in the problem. Then, determine what the solution will include (for example, the largest sum, the shortest path, etc.). Create some sort of iterative way to go through all of the subproblems and build a solution.

47 words