simple C++ faster than 100% solution
\nclass Solution {\npublic:\n    int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {\n        if(obstacleGrid[0][0]==1){\n            return 0;\n 
```\nclass Solution {\npublic:\n    int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {\n        if(obstacleGrid[0][0]==1){\n            return 0;\n        }\n        int m = obstacleGrid.size();\n        int n = obstacleGrid[0].size();\n        int** dp = new int*[m];\n        for(int i=0;i<m;i++){\n            dp[i] = new int[n];\n            for(int j=0;j<n;j++){\n                dp[i][j] = 0;\n            }\n        }\n        dp[0][0]=1;\n        //filling m-2 rows and n-2 colm\n        for(int i=0;i<m-1;i++){\n            for(int j=0;j<n-1;j++){\n                int val=dp[i][j];\n                if(obstacleGrid[i+1][j]!=1)dp[i+1][j]+=val;\n                if(obstacleGrid[i][j+1]!=1)dp[i][j+1]+=val;\n            }\n        }\n        //filling last row\n        for(int j=0;j<n-1;j++){\n            int val=dp[m-1][j];\n            if(obstacleGrid[m-1][j+1]!=1)dp[m-1][j+1]+=val;\n        }\n        //filling last column\n        for(int i=0;i<m-1;i++){\n            int val=dp[i][n-1];\n            if(obstacleGrid[i+1][n-1]!=1)dp[i+1][n-1]+=val;\n        }\n        return dp[m-1][n-1];\n        \n        \n        \n        \n        \n      \n        \n    }\n};\n```
[]