Very clean and easy to understand DP solution
\nclass Solution {\n    public int maximumSum(int[] arr) {\n        int n = arr.length;\n        \n        if(n == 1) return arr[0];\n        \n        int poss
```\nclass Solution {\n    public int maximumSum(int[] arr) {\n        int n = arr.length;\n        \n        if(n == 1) return arr[0];\n        \n        int possibleLargest = -1;\n        \n        int[] prefixSum = new int[n];\n        int[] suffixSum = new int[n];\n        \n        prefixSum[0] = arr[0];\n        suffixSum[n-1] = arr[n-1];\n        \n        for (int i = 1; i < n; i++) {\n            prefixSum[i] = Math.max(prefixSum[i-1] + arr[i], arr[i]);\n            possibleLargest = Math.max(possibleLargest, prefixSum[i]);\n        }\n        for (int i = n-2; i >=0; i--) {\n            suffixSum[i] = Math.max(suffixSum[i+1] + arr[i], arr[i]);\n            possibleLargest = Math.max(possibleLargest, suffixSum[i]);\n        }\n        \n        for(int i=1; i <= n - 2; i++)\n        {\n            possibleLargest = Math.max(prefixSum[i-1] + suffixSum[i+1], possibleLargest);\n        }\n        \n        return possibleLargest;\n    }\n}\n```\n\n\tPLEASE PLEASE UPVOTE IT
['Dynamic Programming', 'Java']