JAVA solution, modified form uniquePath I
modified form uniquePath I;\nset the upper and left boundary of the answer matrix to 1 until blocked;\nset any blocks to 0\n\n\n    public class Solution {\n   
modified form uniquePath I;\nset the upper and left boundary of the answer matrix to 1 until blocked;\nset any blocks to 0\n\n\n    public class Solution {\n        public int uniquePathsWithObstacles(int[][] obstacleGrid) {\n            int width = obstacleGrid[0].length;\n            int lines = obstacleGrid.length;\n            int [][] answer = new int[lines][width];\n            \n           \n            \n            for(int j=0;j<width;j++){\n                if(obstacleGrid[0][j]==1){if(lines==1) return 0; break;}\n                else answer[0][j]=1;\n            }\n            \n            for(int i=0;i<lines;i++){\n                if(obstacleGrid[i][0]==1){if(width==1) return 0; break;}\n                else answer[i][0]=1;\n            }\n            \n            for(int i=1;i<lines;i++){\n                for(int j=1;j<width;j++){\n                    if(obstacleGrid[i][j]!=1){\n                        answer[i][j]=answer[i-1][j]+answer[i][j-1];\n                    }\n                }\n            }\n            \n            return answer[lines-1][width-1];\n            \n        }\n    }
[]