c++ memoization
\nclass Solution {\npublic: int dp[102][102];\n    int solve(vector<vector<int>>& grid,int i,int j){\n        int m=grid.size();\n        int n=grid[0].size();\
```\nclass Solution {\npublic: int dp[102][102];\n    int solve(vector<vector<int>>& grid,int i,int j){\n        int m=grid.size();\n        int n=grid[0].size();\n        \n        if(i>=m || j>=n ) return 0;\n        if(grid[i][j]==1 ) return 0;\n        if(i==m-1 && j==n-1 ) return 1;\n        \n        \n        if(dp[i][j]!=-1)  return dp[i][j];\n        \n        int temp=solve(grid,i+1,j) +solve(grid,i,j+1);\n        \n        return dp[i][j]=temp;\n        \n    }\n    int uniquePathsWithObstacles(vector<vector<int>>& grid) {\n        memset(dp,-1,sizeof dp);\n        return solve(grid,0,0);\n        \n    }\n};\n```
['Memoization', 'C']