114. Sliding Window Maximum
HardQueues
Return the maximum of every contiguous window of size k in nums, from left to right.
Example 1
Input: nums = [1, 3, -1, -3, 5, 3, 6, 7], k = 3 Output: [3, 3, 5, 5, 6, 7]
Constraints
1 ≤ k ≤ nums.length ≤ 10⁵