Loading...
Given an integer array nums, find a subarray that has the largest product and return the product.
2,3,-2,4
6
[2], [2, 3], [2, 3, -2], [2, 3, -2, 4], [3], [3, -2], [3, -2, 4], [-2], [-2, 4], [4][2], [2*3=6], [2*3*-2=-12], [2*3*-2*4=-48], [3], [3*-2=-6], [3*-2*4=-24], [-2], [-2*4=-8], [4][2, 3] with a product of 2⋅3=6