Read the grid, initialize dp[1][1], then fill row by row. For each cell, check if it's blocked before computing. Edge case: the first row can only come from the left, and the first column can only come from above. Handle boundaries carefully. Time complexity is , space is but can be improved to n since you only need the previous row. Trace through a small example to verify your understanding before moving on.
Time complexity: .
Space complexity: .