Tap here to switch tabs
Problem
Submissions

Problem: Maximum Subarray Sum with One Deletion

med
30 min
Try to solve the Maximum Subarray Sum with One Deletion problem.

Statement

Given an integer array arr, return the maximum sum of a non empty subarray where you can choose to delete at most 11 element.

Note: The subarray must contain at least 11 element after performing the optional deletion.

Constraints:

  • 1≤1 \leq arr.length ≤105\leq 10^5

  • −104≤-10^4 \leq arr[i] ≤104\leq 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Subarray Sum with One Deletion

med
30 min
Try to solve the Maximum Subarray Sum with One Deletion problem.

Statement

Given an integer array arr, return the maximum sum of a non empty subarray where you can choose to delete at most 11 element.

Note: The subarray must contain at least 11 element after performing the optional deletion.

Constraints:

  • 1≤1 \leq arr.length ≤105\leq 10^5

  • −104≤-10^4 \leq arr[i] ≤104\leq 10^4