Easy Tabulation with simple explanation
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int maximumAmount(vector<vector<int>>& coins) {
        int row=coins.size();
        int col=coins[0].size();
        //think about last col, from down comes negative and right 0 then you take 0 which is wrong
        // so we take -1e9
        vector<vector<vector<int>>> dp(row+1,vector<vector<int>>(col+1,vector<int>(3,-1e9)));
        for(int i=row-1;i>=0;i--)
        {
            for(int j=col-1;j>=0;j--)
            {
                for(int k=0;k<=2;k++)
                {
                    int c = max(dp[i+1][j][k],dp[i][j+1][k]);
                    if(c<-1e8) c=0; //if both are -1e9 so take 0;

                    if(coins[i][j] > 0 || k==0) //you must take
                    {    
                        dp[i][j][k]=coins[i][j]+c;
                    }
                    else //neg coins and you can neutrslize
                    {
                            //c means no neutralize
                            // caclulate d neutralize
                            int d = max(dp[i+1][j][k-1],dp[i][j+1][k-1]);
                            if(d<-1e8) d=0;
                            dp[i][j][k]=max( coins[i][j]+c, d);
                    }
                }
            }
        }
        return dp[0][0][2];
    }
};
```
['Array', 'Dynamic Programming', 'Matrix', 'C++']