What is the difference between dynamic programming and greedy approach?

前端 未结 6 2361
忘掉有多难
忘掉有多难 2020-12-12 10:10

What is the main difference between dynamic programming and greedy approach in terms of usage?

As far as I understood, the greedy approach sometimes gives a

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 10:48

    the major difference between greedy method and dynamic programming is in greedy method only one optimal decision sequence is ever generated and in dynamic programming more than one optimal decision sequence may be generated.

提交回复
热议问题