Skip to content

Commit 47b8ce4

Browse files
authored
Merge pull request soapyigu#71 from soapyigu/DP
[DP] change Space Complexity for Maximum Product Subarray
2 parents a95605b + ba4438d commit 47b8ce4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DP/MaximumProductSubarray.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Question Link: https://leetcode.com/problems/maximum-product-subarray/
33
* Primary idea: Dynamic Programming, track max and min at the same time
4-
* Time Complexity: O(n), Space Complexity: O(n)
4+
* Time Complexity: O(n), Space Complexity: O(1)
55
*/
66

77
class MaximumProductSubarray {

0 commit comments

Comments
 (0)