Loading topic
dp[i][j] is the number of ways to reach cell (i, j)." The task here is to turn th5 min readdp[i][j], and follow a recurrence such as dp[i][j] = dp[i - 1][j] + dp[i][j - 1]. The previous chapters covered what a cell stores, how moves become recurrences, and how base cases protect the edges. This chapter covers th6 min readdp[i][j] = min(dp[i-1][j], dp[i][j-1]) + grid[i][j].6 min readdp[i][j] recurrences, padded tables, and the one-row trick. Everything so far has filled the table from the start cell toward the goal. Some problems will not let you do 6 min read