30
Dynamic Programming vs Divide-and-Conquer

Dynamic Programming vs Divide-and-Conquer

6 years ago
Anonymous $cyhBy-qkd5

https://itnext.io/dynamic-programming-vs-divide-and-conquer-2fea680becbe

In this article I’m trying to explain the difference/similarities between dynamic programing and divide and conquer approaches based on two examples: binary search and minimum edit distance (Levenshtein distance).

When I started to learn algorithms it was hard for me to understand the main idea of dynamic programming (DP) and how it is different from divide-and-conquer (DC) approach. When it gets to comparing those two paradigms usually Fibonacci function comes to the rescue as great example. But when we’re trying to solve the same problem using both DP and DC approaches to explain each of them, it feels for me like we may lose valuable detail that might help to catch the difference faster. And these detail tells us that each technique serves best for different types of problems.