End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
dp with dimensions m by n and set all values to 1.dp[i][j], set its value to dp[i - 1][j] + dp[i][j - 1].dp[m - 1][n - 1], which represents the number of unique paths to the bottom-right corner.