Here are my observations:

- it's really about odd negative numbers or even negative numbers, if it's odd, either the left end one or the right end one should be counted, so it will be revealed by scanning from left and from right in 2 passes.
- 0 is a kind of delimiter, product accumulation will be reset to 1

```
public int maxProduct(int[] nums) {
int max = Integer.MIN_VALUE, product = 1;
int len = nums.length;
for(int i = 0; i < len; i++) {
max = Math.max(product *= nums[i], max);
if (nums[i] == 0) product = 1;
}
product = 1;
for(int i = len - 1; i >= 0; i--) {
max = Math.max(product *= nums[i], max);
if (nums[i] == 0) product = 1;
}
return max;
}
```