Look at every subarray of nums (a run of numbers that sit side by side) and multiply its numbers. Return the largest product you can get.
The tests are made so that the answer fits in a 32-bit integer.
Examples
Example 1:
Input: nums = [3,-1,2,-2,0,5]
Output: 12
Explanation: The part [3, -1, 2, -2] has the product 12. The zero breaks the run, and 5 alone is smaller.
Example 2:
Input: nums = [-6]
Output: -6
Explanation: The only part is [-6].
Example 3:
Input: nums = [2,0,-1]
Output: 2
Explanation: The best part is [2]. A part with the zero has the product 0.