Skip to content

Commit 165c3c6

Browse files
152 with Dynamic Programming
1 parent 0613330 commit 165c3c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

0152-Maximum-Product-Subarray.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
Output: 0
1414
Explanation: The result cannot be 2, because [-2,-1] is not a subarray.
1515
'''
16+
17+
# Dynamic Programming
18+
19+
# Simlar approach, different steps
20+
1621
class Solution:
1722
def maxProduct(self, nums: List[int]) -> int:
1823
min_prod = max_prod = res = nums[0]

0 commit comments

Comments
 (0)