Given an integer array nums, find a contiguous non-empty subarray with the largest product, and return that product.
Input: one line of space-separated integers. Output: the maximum product.
2 3 -2 4
6
[2,3] gives 6.
-2 0 -1
0
The best you can do is 0.
Run your code against the sample tests, or Submit to run the full suite.