My code is

```
public int maxProduct(int[] A) {
int result = A[0],temp;
for(int i = 0;i<A.length;i++){
temp = A[i];
for(int j = i + 1 ; j < A.length ; j++){
temp = temp * A[j];
if(temp > result){
result = temp;
}
}
if(A[i] > result){
result = A[i];
}
}
return result;
}
```

Last executed input: [-5,2,4,1,-2,2,-6,3,-1,-1,-1,-2,-3.......,1,1,-1,-1,-1,-1,-1,-1] ,array length 15000

My PC total run for 108-112ms

Could anyone tell the correct result?