This year’s Advent of Code has been challenging, especially compared to previous years. One particular problem on day 12 required solving with dynamic programming, which deterred some participants. Dynamic programming can be intimidating if you’re not familiar with it, but it’s actually a natural concept once you understand it. Many common algorithms, like Dijkstra’s algorithm, are just applications of dynamic programming. In this article, the author provides a gentle introduction and detailed explanation of solving the day 12 problem using dynamic programming. The author also discusses the issue of software engineering’s poor naming conventions, using “dynamic programming” as an example. They go on to explain the concept and demonstrate its use in solving problems like Fibonacci and edit distance.
https://qsantos.fr/2024/01/04/dynamic-programming-is-not-black-magic/