Medium1-D DPNeetCode 150 · #107/150
Maximum Product Subarray
- 1Learn the pattern
Define dp[i] in words first, then the recurrence is usually one line. Start from the base cases.
- 2Trace your version
Paste your solution into the workspace and watch every step execute.
Open workspace - 3