Given an array of integers, find the contiguous subarray with the largest product and return that product.
Example 1
Explanation: The subarray [2,3] has the largest product, 6 — extending it to include -2 or -2,4 would lower the product.
Example 2
Explanation: Any subarray touching both negative numbers is blocked by the 0 between them, so the best available product is 0.
Example 3
Explanation: The whole array's product is (-2) * 3 * (-4) = 24 — the two negative signs cancel out, which is exactly why a running minimum must be tracked alongside the maximum.
Code execution is coming soon.