Python:   Easy!   Simple DP Solution  ||  Time O(m*n)
\nclass Solution:\n    def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int:\n        if obstacleGrid[-1][-1] == 1 or obstacleGrid[0][0] == 
```\nclass Solution:\n    def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int:\n        if obstacleGrid[-1][-1] == 1 or obstacleGrid[0][0] == 1:\n            return 0\n\n        dp = [[0] * len(obstacleGrid[0]) for i in range(len(obstacleGrid))]          # DP Matrix of size m*n intialized to 0\n        dp[0][0] = 1\n\n        for r in range(len(obstacleGrid)):\n            for c in range(len(obstacleGrid[0])):\n                if obstacleGrid[r][c] == 0:\n                    dp[r][c] += dp[r - 1][c] if r - 1 >= 0 else 0\n                    dp[r][c] += dp[r][c - 1] if c - 1 >= 0 else 0\n                    \n        return dp[-1][-1]\n\n```
['Python', 'Python3']