Difference between Divide and Conquer Algo and Dynamic Programming

后端 未结 9 1931
一个人的身影
一个人的身影 2020-12-12 08:41

What is the difference between Divide and Conquer Algorithms and Dynamic Programming Algorithms? How are the two terms different? I do not understand the difference between

9条回答
  •  生来不讨喜
    2020-12-12 09:23

    The other difference between divide and conquer and dynamic programming could be:

    Divide and conquer:

    1. Does more work on the sub-problems and hence has more time consumption.
    2. In divide and conquer the sub-problems are independent of each other.

    Dynamic programming:

    1. Solves the sub-problems only once and then stores it in the table.
    2. In dynamic programming the sub-problem are not independent.

提交回复
热议问题