LinkedIn 高频题 � Maximum Sum/Product Subarray | Shepherd's Blog
Maximum Product Subarray其实只需要不断地记录两个值,max和min。max是到当前为止最大的正product,min是到当前为止最小的负product,或者1。
Read full article from LinkedIn 高频题 � Maximum Sum/Product Subarray | Shepherd's Blog
LinkedIn 高频题 � Maximum Sum/Product Subarray | Shepherd's Blog
Maximum Product Subarray其实只需要不断地记录两个值,max和min。max是到当前为止最大的正product,min是到当前为止最小的负product,或者1。
Read full article from LinkedIn 高频题 � Maximum Sum/Product Subarray | Shepherd's Blog
No comments:
Post a Comment