Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest product = 6.
探讨如何寻找一个数组中乘积最大的连续子数组,举例说明了给定数组 [2,3,-2,4] 时,最大乘积子数组为 [2,3],其乘积为 6。
Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest product = 6.
365

被折叠的 条评论
为什么被折叠?