What is the use of greedy algorithms? An real example?
What is the use of greedy algorithms?
We use Greedy Algorithm for to get optimal solution.But all problems can't solve using greedy algorithm.
Optimal substructure property and greedy choice property are key ingredients.if we can demonstrate that the problem has these properties, then we are well on the way to developing a greedy algorithm for it.
Real examples?
Almost all problems that can solve using Dynamic approach can be solve by greedy approach.