Search
⌘K
Get Premium
Leetcode 3364. Minimum Positive Sum Subarray
Find the smallest positive sum of any contiguous subarray whose length is between l and r (inclusive). This reduces to scanning prefix sums and for each end index querying candidate start prefixes at distances in [l,r] (e.g., via a multiset/ordered set) to find the minimal positive prefix-difference.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.