Simple Java DP solution
public class Solution {\n    public int uniquePathsWithObstacles(int[][] obstacleGrid) {\n        int m = obstacleGrid.length;\n        int n = obstacleGrid[0].
    public class Solution {\n    public int uniquePathsWithObstacles(int[][] obstacleGrid) {\n        int m = obstacleGrid.length;\n        int n = obstacleGrid[0].length;\n        int[][] s = new int[m][n];\n        s[0][0] = obstacleGrid[0][0]==0 ? 1:0;\n        if(s[0][0] == 0) return 0;\n        for(int i=0;i<m;i++){\n            for(int j=0;j<n;j++){\n                if(obstacleGrid[i][j] == 1) s[i][j] = 0;\n                else if(i==0){\n                    if(j>0) s[i][j] = s[i][j-1];\n                }\n                else if(j==0){\n                    if(i>0) s[i][j] = s[i-1][j];\n                }\n                else s[i][j] = s[i-1][j] + s[i][j-1];\n            }\n        }\n        return s[m-1][n-1];\n    }\n}
['Dynamic Programming', 'Java']