A robot is located at the top-left corner of a m x n grid and trying to reach the bottom-right corner. The grid consists of open spots that are marked with 0, and obstables that are marked with 1. The robot can only move through open spots and either down or right at any point in time. How many possible unique paths are there?
There is one obstacle in the middle of a 3x3 grid as illustrated below.
The number of unique paths is 2.