FastPrepDisk Space Window Analyzer
Problems/Disk Space Window Analyzer

Disk Space Window Analyzer

Agoda logoAgoda● MediumFULLTIMEPHONE SCREEN
QuestionFunctionExamplesConstraints

Problem statement

Source note: The reported task identifies this algorithmic exercise. The executable interface, bounds, deterministic tie rules, and examples are the documented practice contract.

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) → int

Examples

Example 1

space = [8,2,4,6]windowSize = 2return = 4

Case 1 exercises the documented deterministic contract.

Example 2

space = [1,2,3]windowSize = 1return = 3

Case 2 exercises the documented deterministic contract.

Example 3

space = [5,4,3]windowSize = 3return = 3

Case 3 exercises the documented deterministic contract.

Constraints

  • 1 <= windowSize <= space.length <= 200000.
  • 0 <= space[i] <= 10^9.

More Agoda problems

  • Sort Ones, Twos, and Threes In PlacePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Can Place FlowersPHONE SCREEN · Seen Nov 2026
  • Reverse Words in a StringPHONE SCREEN · Seen Nov 2026
All Agoda interview questionsSee Agoda hiring insights
Saved
class Solution {
    public int maximizeWindowMinimum(int[] space, int windowSize) {
        // Write your code here.
    }

}
Checking account…