GoLang Solution For LeetCode Problem: Maximum Product Subarray
Solving Maximum Product Subarray in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Input: [2,3,-2,4] Output: 6 Explanation: [2,3] has the largest product 6.
Input: [-2,0,-1] Output: 0 Explanation: The result cannot be 2, because [-2,-1] is not a subarray.
See the full details of the problem Maximum Product Subarray at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go