Problem 1186 · Medium

Maximum Subarray Sum with One Deletion

Find the largest sum of a nonempty contiguous run after removing at most one element from it. The visual tracks two running sums across the array, one with the deletion used and one without.

Open the interactive visualisation