Skip to main content
Sliding Window Maximum | AlgoCracked
AlgoCracked
ProblemsSliding Window Maximum
Hard47.0% acceptance
ArraySliding WindowDequeMonotonic Deque

Sliding Window Maximum

You are given an integer array nums and a window size k . The window of size k starts at the left of the array and slides one position to the right at a time. Return an array containing the maximum value of each window. Input format Input is [nums, k] , e.g. [[1,3,-1,-3,5,3,6,7],3] .

Loading workspace…