LeetCode 152: Maximum Product Subarray — Step-by-Step Visual Trace
Medium — Dynamic Programming | Array | Kadane's Algorithm
The Problem
Find the contiguous subarray within an array of integers that has the largest product and return that product.
Approach
Use dynamic programming to track both maximum and minimum pr...
blog.tracelit.dev2 min read