2dbi

Maximum Product Subarray

viaLeetCode

Given an integer array, find the contiguous subarray with the largest product and return that product. Handle negative numbers and zeros by tracking both the running maximum and minimum products.

Add a follow-up question they asked
No follow-ups yet. Be the first to add one.
asked …
LeaderboardSalary
Language
Account