Java 100% Fast DP solution
\nclass Solution \n{\n    public int uniquePathsWithObstacles(int[][] obstacleGrid) \n    {\n        int m=obstacleGrid.length;\n        int n=obstacleGrid[0].l
```\nclass Solution \n{\n    public int uniquePathsWithObstacles(int[][] obstacleGrid) \n    {\n        int m=obstacleGrid.length;\n        int n=obstacleGrid[0].length;\n        \n        int dp[][]=new int[m][n];\n        \n        if(obstacleGrid[0][0]==1)\n        {\n            return 0;\n        }\n        \n        for(int i=0;i<m;i++)\n        {\n            if(obstacleGrid[i][0]==0)\n            {\n                dp[i][0]=1;\n            }\n            else\n            {\n                break;\n            }\n        }\n        \n        for(int i=0;i<n;i++)\n        {\n            if(obstacleGrid[0][i]==0)\n            {\n                dp[0][i]=1;\n            }\n            else\n            {\n                break;\n            }\n        }\n        \n        for(int i=1;i<m;i++)\n        {\n            for(int j=1;j<n;j++)\n            {\n                if(obstacleGrid[i][j]==1)\n                {\n                    dp[i][j]=0;\n                }\n                else\n                {\n                    dp[i][j]=dp[i-1][j]+dp[i][j-1];\n                }\n            }\n        }\n        return dp[m-1][n-1];\n    }\n}\n```\n\n\n\n//  1 1 1 1 1 X 0 0\n//  1 2 3 4\n//\n//\n//\n//
['Dynamic Programming', 'Java']