[C++] One Pass, Simple Solution O(n)
csum: current sum till ith index with at least 1 element.\ncsumd: current sum till ith index with atmost 1 deletion and at least 1 element.\n\ncsumd will be csu
**csum**: current sum till ith index with at least 1 element.\n**csumd**: current sum till ith index with atmost 1 deletion and at least 1 element.\n\n***csumd*** will be ***csum*** if deleting ith index otherwise ***csumd + arr[i]***\n\n```\nint maximumSum(vector<int>& arr) {\n\tint csum = arr[0], csumd = arr[0], ans = arr[0];\n\tfor(int i = 1; i < arr.size(); ++i) {\n\t\tcsumd = max(csum, csumd+arr[i]);\n\t\tcsum = max(arr[i], csum+arr[i]);\n\t\tans = max(ans, max(csum, csumd));\n\t}\n\treturn ans;\n}\n```
[]