Friday, November 29, 2019

Difference between Dynamic Programming & Divide And Conquer

https://en.wikipedia.org/wiki/Dynamic_programming

There are two key attributes that a problem must have in order for dynamic programming to be applicable: optimal substructure and overlapping sub-problems. If a problem can be solved by combining optimal solutions to non-overlapping sub-problems, the strategy is called "divide and conquer" instead.[1] This is why merge sort and quick sort are not classified as dynamic programming problems.

No comments:

Post a Comment

Followers

Blog Archive