Given a rectangular grid obstacleGrid with m rows and n columns, a robot starts at the top left cell and wants to reach the bottom right cell. The robot may move only one cell at a time either right or down.
Each cell in obstacleGrid is either empty or blocked by an obstacle. An obstacle is represented by 1, and an empty cell is represented by 0. Return the number of distinct paths from the start to the destination that avoid all obstacles.
Constraints:
m == obstacleGrid.length
n == obstacleGrid[i].length
m, n
obstacleGrid[i][j] is 0 or 1
Given a rectangular grid obstacleGrid with m rows and n columns, a robot starts at the top left cell and wants to reach the bottom right cell. The robot may move only one cell at a time either right or down.
Each cell in obstacleGrid is either empty or blocked by an obstacle. An obstacle is represented by 1, and an empty cell is represented by 0. Return the number of distinct paths from the start to the destination that avoid all obstacles.
Constraints:
m == obstacleGrid.length
n == obstacleGrid[i].length
m, n
obstacleGrid[i][j] is 0 or 1