Leetcode 0152. Maximum Product Subarray
Posted on Thu 09 January 2025 in Leetcode • Tagged with dp, greedy, prefix-sum-subarray
Question Link : https://leetcode.com/problems/maximum-product-subarray/
Difficulty: Medium
Premium: False
Question
Given an integer array nums, find a subarray that has the largest product, and return the product. The test cases are generated so that the answer will fit in a 32-bit integer. Example 1:
Input: nums = [2,3 …
Continue reading