152. Maximum Product Subarray
# Medium
Key idea: Dynamic Programming
Harder than Maximum Subarray because of '-'
, so record the minimun subarray is necessary too.
Think it in a simper way, max and min can only one of nums[i], nums[i]*max and nums[i]*min
Last updated