Tagged in

Greedy

Coding Memo
Coding Memo
leetcode solutions and programming notes
More information
Followers
16
Elsewhere
More, on Medium

[Leetcode] Maximum Product Subarray

Advanced version of Maximum Subarray. As multiplying a negative switches max/min, instead of keeping the localMax, both max & min should be kept for possible inference.

Description