C++(Dp) Recursion -> Memoization ->Tabulation->space Optimization
\nclass Solution {\npublic:\n    int solve(int i,int j,vector<vector<int>>&grid){\n        if(i<0 || j<0 || grid[i][j]==1) return 0;\n        if(i==0 && j==0) r
```\nclass Solution {\npublic:\n    int solve(int i,int j,vector<vector<int>>&grid){\n        if(i<0 || j<0 || grid[i][j]==1) return 0;\n        if(i==0 && j==0) return 1;\n        \n        int up=solve(i-1,j,grid);\n        int left=solve(i,j-1,grid);\n        \n        return up+left;\n    }\n    int solveMemo(int i,int j,vector<vector<int>>&grid,vector<vector<int>>&dp){\n        if(i<0 || j<0 || grid[i][j]==1) return 0;\n        if(i==0 && j==0) return 1;\n        if(dp[i][j]!=-1) return dp[i][j];\n        int up=solveMemo(i-1,j,grid,dp);\n        int left=solveMemo(i,j-1,grid,dp);\n        \n        return dp[i][j]=up+left;\n    }\n     int solveTabu(int m,int n,vector<vector<int>>&grid){\n                vector<vector<int>>dp(m,vector<int>(n,0));\n         for(int i=0;i<m;i++){\n             for(int j=0;j<n;j++){\n                 if(grid[i][j]==1) continue;\n                 if(i==0 && j==0 ) dp[i][j]=1;\n                 else{\n                     int up=0,left=0;\n                     if(i>0) up=dp[i-1][j];\n                     if(j>0) left=dp[i][j-1];\n                     \n                     dp[i][j]=up+left;\n                 }\n             }\n         }\n         return dp[m-1][n-1];\n\n    }\n    int solveTabuSo(int m,int n,vector<vector<int>>&grid){\n                vector<int>prev(n,0);\n        \n         for(int i=0;i<m;i++){\n             vector<int>cur(n,0);\n             for(int j=0;j<n;j++){\n                 if(grid[i][j]==1) continue;\n                 if(i==0 && j==0 ) cur[j]=1;\n                 else{\n                     int up=0,left=0;\n                     if(i>0) up=prev[j];\n                     if(j>0) left=cur[j-1];\n                     \n                    cur[j]=up+left;\n                 }\n             }\n             prev=cur;\n         }\n         return prev[n-1];\n\n    }\n    int uniquePathsWithObstacles(vector<vector<int>>& grid) {\n        int m=grid.size();\n        int n=grid[0].size();\n        // return solve(m-1,n-1,grid);\n        // vector<vector<int>>dp(m,vector<int>(n,-1));\n        // return solveMemo(m-1,n-1,grid,dp);\n        // return solveTabu(m,n,grid);\n        return solveTabuSo(m,n,grid);\n    }\n};\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'C', 'C++']