You are given an array of integers `nums`, there is a sliding window of size `k` which is moving from the very left of the array to the very right. You can only see the `k` numbers in the window. Each time the sliding window moves right by one position. Return the max sliding window.
Monotonic Deque
We use a deque to store the indices of the elements in the current window. We maintain the deque such that the elements at the indices in the deque are in strictly decreasing order. Thus, the front of the deque always contains the index of the maximum element in the current window. For each new element, we remove indices of smaller elements from the back of the deque, and remove the front index if it has fallen out of the window.