Disk Space Window Analyzer
Problem statement
For every contiguous window of windowSize entries, compute the minimum available space. Return the maximum of those window minimums.
Function
maximizeWindowMinimum(space: int[], windowSize: int) → intExamples
Example 1
space = [8,2,4,6]windowSize = 2return = 4Case 1 exercises the documented deterministic contract.
Example 2
space = [1,2,3]windowSize = 1return = 3Case 2 exercises the documented deterministic contract.
Example 3
space = [5,4,3]windowSize = 3return = 3Case 3 exercises the documented deterministic contract.
Constraints
1 <= windowSize <= space.length <= 200000.0 <= space[i] <= 10^9.