Available question text
For each fixed-size sliding window in an array, determine the length of the smallest contiguous subarray that must be sorted so the whole window becomes sorted. The challenge is to compute these minimal unsorted-segment bounds efficiently for every window (better than sorting each window), typically by using local minima/maxima or monotonic data structures.
Related questions
Continue with questions that share topics or the same question type.
- Design a Sliding-Window Event Stream Processor with Checksum Validation and Average Payload Length
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Implement a rate limiter using the sliding window log algorithm
Coding
- Kth Smallest Subarray Sum
Coding
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 3555. Smallest Subarray to Sort in Every Sliding Window
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source