Search
⌘K
Leetcode 239. Sliding Window Maximum
Given an integer array and a window size k, return the maximum value for each contiguous subarray (sliding window) as it moves one step to the right. With n up to 1e5, this requires an O(n) approach typically implemented with a monotonic deque to maintain candidate maxima.
Asked at:
Microsoft
Netflix
Meta
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late March, 2026
Netflix
Senior
common patterns related to sliding window
Mid February, 2026
Microsoft
Mid-level
Mid November, 2025
Microsoft
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.