DP solution to uniquePathsWithObstacles