Leetcode 3638. Maximum Balanced Shipments
Select the maximum number of non-overlapping contiguous subarrays such that in each chosen segment the last element is strictly less than the maximum element of that segment. With n up to 1e5, the core challenge is deciding optimal cut points (typically via a greedy/DP strategy using running maxima) to maximize the count.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.