Can anyone explain why my solution is giving TLE, 
IntuitionCan anyone explain why my code is giving TLE, maybe if I convert it into tabularization it might work but i want to find out the reason.PS : i tried wi
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Can anyone explain why my code is giving TLE, maybe if I convert it into tabularization it might work but i want to find out the reason. 

PS : i tried with adding fast i/o line too. 
# Approach
3D Dp -> i , j, k where i and j are the coordinate of the cell and k represent the power of the robot to neutralize robber. 

# Complexity
- Time complexity:
O ( n * m * k) which is basically O(n * m) because k is constant. 

- Space complexity:
 O ( N * M * K)

# Code
```cpp []


class Solution {

public:

    int traverse(vector<vector< vector<int> > > &dp, int i, int j, vector<vector<int>> & ar, int k, int n, int m){
        if(i >= n || j >= m){
            return -1000000;
        }
        if(i == (n - 1)  && j == (m - 1) ){
            if (ar[i][j] >= 0 || k <= 0) 
                return ar[i][j];
            
            return 0;
        }

        if(dp[i][j][k] != -1) return dp[i][j][k];

        int ans = traverse(dp, i + 1, j, ar, k, n, m) + ar[i][j];
        ans = max(ans, traverse(dp, i, j + 1, ar, k, n, m) + ar[i][j] );

        if(k > 0 && ar[i][j] < 0){
            ans = max(ans, traverse(dp, i , j + 1, ar, k -1, n, m));
            ans = max(ans, traverse(dp, i + 1, j, ar, k - 1, n, m));
        }
    
        return dp[i][j][k] = ans;
    }
    int maximumAmount(vector<vector<int>>& ar) {
        
        int n = ar.size(); 
        int m = ar[0].size();
        
        vector<vector< vector<int> > > dp(n, vector<vector<int>> (m, vector<int>(3, -1)));


        return  traverse(dp, 0, 0, ar, 2, n, m);
    }
};
```
['C++']