Difference between dynamic programming and divide and search

divide and search
divide problem into subpart and then solve subpart
e.g : quick sort , merge sort.
used in complex problem-solving
Dynamic programming
after dividing the problem into subpart greedy choose the sub part to solve to get optimized result
e.g : longest common subproblem, knapsack problem, matrix multiplication.
used in Optimisation of solution

No comments:

Post a Comment