Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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:
Meta
Amazon
Microsoft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid November, 2025
Microsoft
Mid-level
Early May, 2025
Meta
Mid-level
Early February, 2025
Meta
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.