C++ Tabulation Easy solution
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```cpp []\nclass Solution {\npublic:\n    int maxScore(vector<vector<int>>& grid) {\n        int n=grid.size();\n        int m=grid[0].size();\n\n        vector<vector<int>> dp(n,vector<int>(m));\n        dp[0][0]=grid[0][0];\n        int diff=INT_MIN;\n        for(int i=1;i<m;i++)\n        {\n            diff=max(diff,grid[0][i]-grid[0][i-1]);\n            dp[0][i]=min(dp[0][i-1],grid[0][i]);\n        }\n\n        for(int i=1;i<n;i++)\n        {\n            diff=max(diff,grid[i][0]-grid[i-1][0]);\n            dp[i][0]=min(dp[i-1][0],grid[i][0]);\n        }\n\n        for(int i=1;i<n;i++)\n        {\n            for(int j=1;j<m;j++)\n            {\n                diff=max(diff,grid[i][j]-grid[i][j-1]);\n                diff=max(diff,grid[i][j]-grid[i-1][j-1]);\n                diff=max(diff,grid[i][j]-grid[i-1][j]);\n                dp[i][j]=min({dp[i-1][j],dp[i][j-1],dp[i-1][j-1],grid[i][j]});\n            }\n        }\n        int ans=INT_MIN;\n        for(int i=0;i<n;i++)\n        {\n            for(int j=0;j<m;j++)\n            {\n                if(grid[i][j]!=dp[i][j])\n                {\n                     ans=max(ans,grid[i][j]-dp[i][j]);\n                }\n                \n            }\n        }\n\n        return ans==INT_MIN?diff:ans;\n        \n    }\n};\n```
['C++']