Given an integer array nums, find a contiguous non-empty subarray within the array that has the largest product, and return the product. The test cases are generated so that the answer will fit in a ...
此题是053.Maximum-Subarray的进阶版。本题的关键点在于,如果nums[i]是负数,那么求以i为结尾的最大乘积子数组,其实转化为求以 ...