class Solution {
public:
int maxProduct(vector<int>& nums) {
if (nums.size() == 0) {
return 0;
}
vector<int>res;
int size = nums.size(), maxProd = INT_MIN, start = 0, end = 0;
for (int i = 0; i < size; i++) {
int prod = 1;
for (int j = i; j >=0; j--) {
prod *= nums[j];
maxProd = max(maxProd, prod);
}
}
return maxProd;
}
};