dp is new love
well simple we have two path to go we use dp array, we choose any one and add it them to the asnwere\nclass Solution {\npublic int fun(int x,int y, int[][]g,int
well simple we have two path to go we use dp array, we choose any one and add it them to the asnwere\n```class Solution {\npublic int fun(int x,int y, int[][]g,int [][]dp){\n   \n    if(x<0||y<0)return 0;\n     if(dp[x][y]!=-1)return dp[x][y];\n    if(g[x][y]==1)return dp[x][y]=0;\n    if(x==0&&y==0)return dp[x][y]= 1;\n    return dp[x][y]=fun(x-1,y,g,dp)+fun(x,y-1,g,dp);\n}\n    public int uniquePathsWithObstacles(int[][] g) {\n        int dp[][]=new int[g.length][g[0].length];\n        for(int i=0;i<g.length;i++){\n            for(int j=0;j<g[0].length;j++)dp[i][j]=-1;\n            \n        }\n        if(g[0][0]==1||g[g.length-1][g[0].length-1]==1)return 0;\n        int a= fun(g.length-1,g[0].length-1,g,dp);\n        return dp[g.length-1][g[0].length-1];\n    }\n}```
['Dynamic Programming', 'Recursion', 'Java']