IT fourth year
\n Add your space complexity here, e.g. O(n) \n\n# Code\n\nclass Solution {\npublic:\n    int maximumSum(vector<int>& arr) {\n        int prev_with_del=0,prev_n
\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maximumSum(vector<int>& arr) {\n        int prev_with_del=0,prev_not_del=arr[0],maxi=arr[0];\n        for(int i=1;i<arr.size();i++)\n        {\n            prev_with_del=max(prev_not_del,arr[i]+prev_with_del);\n            prev_not_del=max(prev_not_del+arr[i],arr[i]);\n            maxi=max(prev_with_del,maxi);\n            maxi=max(prev_not_del,maxi);\n        }\n        return maxi;\n            }\n};\n```
['C++']