Same as Unique Paths, but the grid has obstacles. obstacleGrid[r][c]=1 means blocked. Return the number of unique paths avoiding obstacles. Robot moves only right or down.
[[0,0,0],[0,1,0],[0,0,0]]2[[0,1],[0,0]]1Obstacle cells cannot be reached, so dp=0. Open cells inherit top+left. A 0 propagates through adjacent cells that depend on it, correctly blocking all paths through the obstacle.