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
Oracle
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Late June, 2026
Oracle
Principal
Late March, 2026
Netflix
Senior
common patterns related to sliding window
Mid February, 2026
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.