Python Solution Using Memoization with simple Explanation | Beats 100% in Time Complexity 
IntuitionThis problem either can be solved using tabulation or memoization.
This solution uses memoization technique to solve this problem.Approach
Let declare
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
This problem either can be solved using tabulation or memoization.
This solution uses memoization technique to solve this problem.
# Approach
<!-- Describe your approach to solving the problem. -->
1. Let declare a dictionary to store the calculated results of the functon.
2. Check if the index is in the last row and col.
3. Check out of bound row or col
4. Check ans present in dictionary
5. Moving through right and left of the grid without applying any neutralize.
``` right = helper(i+1,j,neutralize); down = helper(i,j+1,neutralize)```
6. Moving through right and left of the grid appliying neutralize if available.
7. store the result in dictionary.
8. return the result.

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

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

# Code
```python3 []
class Solution:
    def maximumAmount(self, coins: List[List[int]]) -> int:
        dic = {}
        def helper(i: int,j: int,neutralize: int) ->int:
            #check if the index is in the last row and col
            if i==len(coins)-1 and j==len(coins[0])-1:
                ans = coins[i][j]
                if ans<0 and neutralize>0:
                    return 0
                else:
                    return ans
            
            #check out of bound row or col
            if i>=len(coins) or j>=len(coins[0]):
                return -float('inf')

            #check ans present in dictionary
            if (i,j,neutralize) in dic:
                return dic[i,j,neutralize]

            #moving through right and left of the grid without applying any neutralize
            down_row = helper(i+1,j,neutralize)
            right_col = helper(i,j+1,neutralize)
            ans = max(down_row,right_col) + coins[i][j]

            #moving through right and left of the grid appliying neutralize if available
            if coins[i][j]<0 and neutralize>0:
                ans = max(helper(i+1,j,neutralize-1),helper(i,j+1,neutralize-1),ans)

            #storing the ans in dictionary
            dic[i,j,neutralize]=ans
            return ans
        return helper(0,0,2) #start at [0,0] with neutralize = 2
                
                
```
['Python3']