Given an integer array nums, find a contiguous non-empty subarray that has the largest product, and return that product.
nums
Example
nums = [2, 3, -2, 4] => 6 // [2, 3] nums = [-2, 0, -1] => 0
function MaxProduct(nums: int[]) -> int
Found a bug? Or annoyed about something in the language? Tell us.