We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a95605b + ba4438d commit 47b8ce4Copy full SHA for 47b8ce4
DP/MaximumProductSubarray.swift
@@ -1,7 +1,7 @@
1
/**
2
* Question Link: https://leetcode.com/problems/maximum-product-subarray/
3
* Primary idea: Dynamic Programming, track max and min at the same time
4
- * Time Complexity: O(n), Space Complexity: O(n)
+ * Time Complexity: O(n), Space Complexity: O(1)
5
*/
6
7
class MaximumProductSubarray {
0 commit comments