Reported September 2026
Oraclemonotonic stack

Maximum of Window Minimums

Reported by candidates from Oracle's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Oracle OA. Under 2s to a working solution.
Founder's read

Oracle reported this one in September 2026, and the detail that matters is in the first example: the window minimums are -1, -1, -1, and 3, and you return the 3. It's a sliding window minimum problem with one extra step on top. With nums up to 200000 long, the brute force of scanning every window will time out. If you've got an OA invite for Oracle, this is a pattern worth knowing cold. And if you blank mid-assessment, StealthCoder runs invisibly on your screen as a safety net.

The problem

Given an integer array nums and an integer windowSize, consider every contiguous subarray of length windowSize.
Find the minimum value in each window and return the maximum among those window minimums.

Function
maximumOfWindowMinimums(nums: int[], windowSize: int) → int

Examples
Example 1
nums = [1,3,-1,5,3,6]
windowSize = 3
return = 3
The window minimums are -1, -1, -1, and 3; their maximum is 3.
Example 2
nums = [-4,-2,-5]
windowSize = 1
return = -2
With window size 1, each element is its own minimum, so the maximum is -2.

Constraints
1 <= nums.length <= 200000
-10^9 <= nums[i] <= 10^9
1 <= windowSize <= nums.length

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick is a monotonic deque. Walk the array once and keep indices in the deque so their values increase from front to back. Before pushing index i, pop from the back while the back value is greater than or equal to nums[i]. Pop the front when its index falls out of the window, meaning index <= i - windowSize. Once i >= windowSize - 1, the front of the deque holds the window minimum. Track the running max of those minimums and return it. That's O(n) time and O(k) space. The common pitfall is the brute force O(n*k) scan, which dies at 200000 elements. Another is initializing the answer to 0, which breaks on all-negative input like Example 2. Start from negative infinity or the first minimum. If the deque logic slips under pressure, StealthCoder is the hedge during the live OA.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Maximum of Window Minimums cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Oracle's OA.

Oracle reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Maximum of Window Minimums FAQ

What's the trick for Maximum of Window Minimums?+

Use a monotonic deque to get each window's minimum in amortized O(1). Keep indices with increasing values, drop expired indices from the front, and pop larger values from the back. Then take the max of all window minimums as you go. Total time is O(n).

How hard is this problem really?+

It's medium. It's basically Sliding Window Maximum flipped to minimum, plus one running max. If you've seen the deque pattern it takes ten minutes. If you haven't, the brute force is easy to write but fails the 200000 length constraint.

Can I solve it without a deque?+

Yes, but with tradeoffs. A heap with lazy deletion works in O(n log n). A sparse table also works. You could also binary search the answer, checking if some window has all values at least X. The deque is simplest and fastest.

What edge cases should I test?+

Test windowSize 1, where the answer is just the max element, as in Example 2 with all negatives. Test windowSize equal to the array length, where the answer is the global minimum. Also test duplicates and values near -10^9, and don't initialize your answer to 0.

How do I prepare in 48 hours for this OA?+

Write the monotonic deque sliding window maximum from memory twice, then flip it to minimum. Then add the running max on top. Practice on negative and duplicate inputs. Know the complexity: O(n) time, O(k) space. That covers this Oracle question and its close variants.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Oracle.

OA at Oracle?
Invisible during screen share
Get it