Recursion || DP || Memoization
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    private Integer dp[][];\n    public int maxScore(List<List<Integer>> grid) {\n        int m = grid.size() , n = grid.get(0).size();\n        dp = new Integer[m][n];\n        int max = Integer.MIN_VALUE;\n        for(int i = 0 ; i < m ; i++){\n            for(int j = 0 ; j < n ; j++){\n                int temp = getMaxDiff(i,j,m,n,grid);\n                max = Math.max(temp,max);\n            }\n        }\n        return max;\n    }\n    public int getMaxDiff(int row,int col ,int m,int n,List<List<Integer>> grid){\n        if(row >= m || col >= n) return Integer.MIN_VALUE;\n        if(dp[row][col] != null) return dp[row][col]; \n        int max = Integer.MIN_VALUE , ele = grid.get(row).get(col);   \n        int temp =  Math.max(0 , getMaxDiff(row+1,col,m,n,grid));\n        if(row +1 < m)    max = Math.max(max , grid.get(row+1).get(col) - ele +temp);\n        temp = Math.max(0,getMaxDiff(row,col+1 ,m,n,grid));\n        if(col+1 < n)    max = Math.max(max , grid.get(row).get(col + 1) - ele +temp);\n        \n        return dp[row][col] = max ;\n    }\n}\n```
['Java']