File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 44- -10 <= nums[i] <= 10
55- The product of any subarray of nums is guaranteed to fit in a 32-bit integer.
66
7- Time Complexity:
8- - O(n): λ°°μ΄μ ν λ²λ§ μννλ©΄μ κ° μμΉμμ μμ μκ° μ°μ°λ§ μν
7+ Time Complexity: O(n)
8+ - λ°°μ΄μ ν λ²λ§ μννλ©΄μ κ° μμΉμμ μμ μκ° μ°μ°λ§ μν
99
10- Space Complexity:
11- - O(1): κ³ μ λ μΆκ° λ³μλ§ μ¬μ© (curr_max, curr_min, ...)
10+ Space Complexity: O(1)
11+ - κ³ μ λ μΆκ° λ³μλ§ μ¬μ© (curr_max, curr_min, ...)
1212
1313νμ΄λ°©λ²:
14141. DPλ‘ κ° μμΉμμ κ°λ₯ν μ΅λκ³±κ³Ό μ΅μκ³±μ λμμ μΆμ ν¨
@@ -34,4 +34,3 @@ def maxProduct(self, nums: List[int]) -> int:
3434
3535 return result
3636
37-
You canβt perform that action at this time.
0 commit comments