Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cygra committed Jun 29, 2021
1 parent f0ee665 commit 1e83a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 0152. 乘积最大子数组.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var maxProduct = function(nums) {

min = Math.min(nums[i] * maxTemp, nums[i], nums[i] * minTemp)
max = Math.max(nums[i] * minTemp, nums[i], nums[i] * maxTemp)
result = Math.max(result, max)
result = Math.max(result, max) // 及时把 max 存下来,避免被 0 截断
}
return result
};
Expand Down

0 comments on commit 1e83a22

Please sign in to comment.