Based on the point "Exactly n-1 moves" | Single Dp | 100% Fast !
\nclass Solution {\n    \n    int solveUpRight(int i, int j, vector<vector<int>> &fruits, vector<vector<int>> &dp, int n){\n        if(i == n-1 && j == n-1) ret
```\nclass Solution {\n    \n    int solveUpRight(int i, int j, vector<vector<int>> &fruits, vector<vector<int>> &dp, int n){\n        if(i == n-1 && j == n-1) return 0;\n        if(i >= j || j == n) return 0;\n        \n        if(dp[i][j] != -1) return dp[i][j];\n        \n        return dp[i][j] = fruits[i][j] + max(solveUpRight(i+1, j, fruits, dp, n), max(solveUpRight(i+1, j-1, fruits, dp, n), solveUpRight(i+1, j+1, fruits, dp, n)));\n    }\n    \n    int solveBottomLeft(int i, int j, vector<vector<int>> &fruits, vector<vector<int>> &dp, int n){\n        if(i == n-1 && j == n-1) return 0;\n        if(i <= j || i == n) return 0;\n        \n        if(dp[i][j] != -1) return dp[i][j];\n        \n        return dp[i][j] = fruits[i][j] + max(solveBottomLeft(i+1, j+1, fruits, dp, n), max(solveBottomLeft(i-1, j+1, fruits, dp, n), solveBottomLeft(i, j+1, fruits, dp, n)));\n    }\n    \npublic:\n    int maxCollectedFruits(vector<vector<int>>& fruits) {\n        int n = fruits.size();\n        //  A single DS for storing dynamic values for both the functions \n\t\t// BCZ they will not overlap forever \n        vector<vector<int>> dp(n, vector<int> (n, -1));\n        \n        int ans = 0;\n\t\t//  the first children who\'ll have only one path -> diagonal one\n        for(int i = 0; i < n; i++) ans += fruits[i][i];\n        //  First + Second + Third Children \n        return ans + solveUpRight(0, n-1, fruits, dp, n) + solveBottomLeft(n-1, 0, fruits, dp, n);\n    }\n};\n```
['Dynamic Programming', 'C', 'Matrix']