Pergunta de entrevista da empresa Cognizant

Difference between Greedy algorithm and dynamic.