Unique Paths to Goal
Given a robot located at the top-left corner of an grid (marked start in the illustration below), determine the number of unique paths that the robot could take from start to finish while avoiding all obstacles on the grid.
The robot can only move either down or right at any time. The robot tries to reach the bottom-right corner of the grid (marked finish in the illustration below).
An obstacle is marked as
1, and an unoccupied space is marked as
0 in the grid.
Consider the grid below, there is one obstacle in the middle of this grid. There are 2 unique paths to reach from start to finish.