Dynamické programovanie
https://www.spiceworks.com/tech/devops/articles/what-is-dynamic-programming/
Dynamic programming is a computer programming technique where an algorithmic problem is first broken down into sub-problems, the results are saved, and then the sub-problems are optimized to find the overall solution — which usually has to do with finding the maximum and minimum range of the algorithmic query.
Richard Bellman