Skip to content

Commit 1a59291

Browse files
authored
Update Solution0152.java
1 parent 5acb54e commit 1a59291

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

leetcode_Java/Solution0152.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class Solution {
1010
public int maxProduct(int[] nums) {
1111
int res = nums[0], imax = 1, imin = 1;
12-
for (int i = 1; i < nums.length; i++) {
12+
for (int i = 0; i < nums.length; i++) {
1313
if (nums[i] < 0) {
1414
int temp = imax;
1515
imax = imin;
@@ -69,4 +69,4 @@ public int maxProduct(int[] nums) {
6969
}
7070
return res;
7171
}
72-
}
72+
}

0 commit comments

Comments
 (0)