How is dynamic programming different from greedy algorithms?

前端 未结 7 930
故里飘歌
故里飘歌 2020-12-12 13:40

In the book I am using Introduction to the Design & Analysis of Algorithms, dynamic programming is said to focus on the Principle of Optimality

相关标签:
7条回答
  • 2020-12-12 14:44

    Greedy method:

    1. Greedy method focuses on expanding partially constructed solutions.
    2. It provides many results such as feasible solution.
    3. More efficient

    Dynamic programming:

    1. Focuses on principle of optimality.
    2. It provides specific answers.
    3. Less efficient
    0 讨论(0)
提交回复
热议问题