Dynamic programming is a very modern way to solve problems. The process involves breaking a big problem into smaller chunks of problems, finding solutions for those chunks and repeating the process to solve the entire complex problem. It is a bit difficult to grasp this technique at first, but with sufficient practice any problem can be solved using dynamic programming. Most of the problems we will encounter while programming a video game will be complex. Hence, mastering this technique will be really useful.
In this recipe, we will find out how easy it is to use dynamic programming to solve a problem: