two-dimensional DP
RU: двумерное ДП
A dynamic program whose subproblem needs two indices, so the state is dp[i][j] and the cache is a 2D table. The two indices are independent positions such as a row and a column, or prefixes of two strings.
RU: двумерное ДП
A dynamic program whose subproblem needs two indices, so the state is dp[i][j] and the cache is a 2D table. The two indices are independent positions such as a row and a column, or prefixes of two strings.