Skip to content

Commit

Permalink
[DP] change Space Complexity for Maximum Product Subarray
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Gu committed Jun 30, 2016
1 parent 4e14fbf commit ba4438d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DP/MaximumProductSubarray.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Question Link: https://leetcode.com/problems/maximum-product-subarray/
* Primary idea: Dynamic Programming, track max and min at the same time
* Time Complexity: O(n), Space Complexity: O(n)
* Time Complexity: O(n), Space Complexity: O(1)
*/

class MaximumProductSubarray {
Expand Down

0 comments on commit ba4438d

Please sign in to comment.