What are the difference between greedy algorithm and dynamic programing?

Answer:

A greedy algorithm is similar to a dynamic programming algorithm, but the difference is that solutions to the subproblems do not have to be known at each stage; instead a "greedy" choice can be made of what looks best for the moment.

First answer by ID3418259628. Last edit by ID3418259628. Question popularity: 4 [recommend question].