Python recursive solution with cache - 54ms
class Solution:\n        # @param {integer[][]} obstacleGrid\n        # @return {integer}\n        def uniquePathsWithObstacles(self, obstacleGrid):\n          
    class Solution:\n        # @param {integer[][]} obstacleGrid\n        # @return {integer}\n        def uniquePathsWithObstacles(self, obstacleGrid):\n            if not len(obstacleGrid) or not len(obstacleGrid[0]):\n                return 0\n    \n            cache = {}\n            m, n = len(obstacleGrid) - 1, len(obstacleGrid[0]) - 1\n    \n            return self.findPath(obstacleGrid, m, n, cache)\n    \n        def findPath(self, obstacleGrid, m, n, cache):\n            if (m, n) in cache:\n                return cache[(m, n)]\n            elif m < 0 or n < 0 or obstacleGrid[m][n] == 1:\n                return 0\n            elif m == 0 and n == 0:\n                return 1\n    \n            cache[(m, n)] = self.findPath(obstacleGrid, m - 1, n, cache) + self.findPath(obstacleGrid, m, n - 1, cache)\n    \n            return cache[(m, n)]
['Python']