Back to QuestionsPractice with This Question
Sliding Window Maximum
58K views•Asked at Google•
Hard
Question Explain
Given an array `nums` and a sliding window size $k$, find the maximum number in each window. Use a Deque (Double-Ended Queue) for an $O(n)$ solution.
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.