Dynamic Programming
Dynamic Programming (DP) is usually used to solve optimization problems.
Tips: Sometimes you do not need to store the whole DP table in memory, the last two values or the last two rows of the matrix will suffice.
Dynamic Programming (DP) is usually used to solve optimization problems.
Tips: Sometimes you do not need to store the whole DP table in memory, the last two values or the last two rows of the matrix will suffice.