Given an integer array nums, return the maximum product of a subarray after deleting at most one element from that subarray. Pattern focus: Max product subarray. This variant tests whether you can adapt the running-product recurrence to allow one skip.
nums = integer array
maximum product after deleting at most one element
Example 1:
Input:
nums = [1,-2,-3,4]
Output:
24
Explanation:
Removing nothing already gives the best product.
Example 2:
Input:
nums = [-1,-2,-3,0]
Output:
6
Explanation:
Deleting one negative element from [-1,-2,-3] gives product 6.