1746. Maximum Subarray Sum After One Operation
https://leetcode.com/problems/maximum-subarray-sum-after-one-operation
Description
You are given an integer array nums
. You must perform exactly one operation where you can replace one element nums[i]
with nums[i] * nums[i]
.
Return the maximum possible subarray sum after exactly one operation. The subarray must be non-empty.
Example 1:
Example 2:
Constraints:
1 <= nums.length <= 105
-104 <= nums[i] <= 104
ac
Last updated