 Check out Easy-to-Understand Simple Memoization Approach! 🚀
Code
# Code
```cpp []
class Solution {
public:
    // Recursive helper function with memoization
    int func(int i, int j, vector<vector<int>>& coins,
             vector<vector<vector<int>>>& dp, int nutralize) {

        // Base case: reached the starting cell (0,0)
        if (i == 0 && j == 0) {
            // If the starting cell is negative and neutralizations are
            // available, neutralize it
            if (coins[i][j] < 0 && nutralize > 0)
                return 0;
            return coins[i][j]; // Otherwise, take its value
        }

        // Out of bounds check
        if (i < 0 || j < 0)
            return INT_MIN;

        // Return cached result if already computed
        if (dp[i][j][nutralize] != -1)
            return dp[i][j][nutralize];

        // Option 1: Move from top or left, adding the current coin's value
        int fc = coins[i][j] + max(func(i - 1, j, coins, dp, nutralize),
                                   func(i, j - 1, coins, dp, nutralize));

        // Option 2: Neutralize the current negative coin if possible
        int sc = INT_MIN;
        if (nutralize > 0 && coins[i][j] < 0)
            sc = max(
                func(i - 1, j, coins, dp, nutralize - 1),
                func(i, j - 1, coins, dp,
                     nutralize - 1)); // Move without adding the negative coin

        // Store and return the best option between 
        return dp[i][j][nutralize] = max(fc, sc);
    }

    // Main function to initiate the process
    int maximumAmount(vector<vector<int>>& coins) {
        int n = coins.size();    // Number of rows
        int m = coins[0].size(); // Number of columns

        // 3D DP array for memoization: dp[i][j][neutralize]
        vector<vector<vector<int>>> dp(
            n, vector<vector<int>>(m, vector<int>(3, -1)));

        // Start from the bottom-right cell with 2 neutralizations allowed
        return func(n - 1, m - 1, coins, dp, 2);
    }
};

```
![upvote please.png](https://assets.leetcode.com/users/images/812024bb-8f42-4fb7-82cd-9dfcb49e8a3d_1736657567.5150974.jpeg)

['Dynamic Programming', 'Recursion', 'Memoization', 'C++']