Given an integer array nums, return the largest product of any contiguous subarray.
nums
nums = [2,3,-2,4]
6
Why
[2,3]
nums = [-2,0,-1]
0
1 <= nums.length <= 2 * 10^4 -10 <= nums[i] <= 10 The answer fits in a 32-bit integer.
Topics
Implement maxProduct in the editor and return the answer — printing it is never graded.
maxProduct
Problem 93 of 1146 in the arena