Available question text
Pick exactly k distinct non-empty subarrays (overlaps allowed) to maximize the sum of their ranges (max - min). The core challenge is to efficiently compute and rank subarray range values—by decomposing contributions of each element as a subarray maximum or minimum (monotonic stacks) and extracting the top-k totals—without enumerating all O(n^2) subarrays.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3691. Maximum Total Subarray Value II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source