Search
⌘K

Leetcode 1793. Maximum Score of a Good Subarray

Find the maximum value of min(nums[i..j]) * (j - i + 1) over all subarrays [i, j] that contain index k — i.e., the largest "area" under the array-as-histogram subject to including bar k. The core challenge is to efficiently maximize this min×length product (n up to 1e5), typically solved with a linear two-pointer expansion or monotonic-stack pattern.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.