Dynamic Programming (DP) is a method for solving complex problems by breaking them down into smaller subproblems and solving them in a systematic way.
DP uses a technique called memoization, which is a way of storing the results of expensive function calls and returning the cached result when the same inputs occur again.