C++ O(n) O(1) beats 100% and 100% (11 lines)
Use Kadane\'s algorithm to update variable max_without_deletion and decide if it is better to extend the subarray with deletion or start a new subarray with del
Use Kadane\'s algorithm to update variable ```max_without_deletion``` and decide if it is better to extend the subarray with deletion or start a new subarray with deletion from the current subarray without deletion by not including the current array element. \n\n```\n    int maximumSum(vector<int>& arr) {\n        int max_with_deletion;\n        int max_without_deletion = arr[0];\n        int result = arr[0];\n        for (int i = 1; i < arr.size(); i++) {\n            max_with_deletion = (1 == i) ? arr[0] : max(max_with_deletion + arr[i], max_without_deletion);\n            max_without_deletion = max(arr[i], max_without_deletion + arr[i]); \n            result = max(result, max(max_with_deletion, max_without_deletion));\n        }\n        return result;\n    }\n```
[]