Leetcode 1950. Maximum of Minimum Values in All Subarrays
Given an array, compute for every window size k (1..n) the maximum value among the minimums of all contiguous subarrays of length k. The efficient solution derives, for each element, the range of window sizes where it is the subarray minimum (using previous/next smaller spans, e.g., a monotonic stack) and uses that to populate the results in O(n).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.