Sliding window maximum, k=3, input [1, 3, -1, -3, 5, 3, 6, 7] ============================================================= right=0 a[right]=1 deque(value@index)=[1@0] right=1 a[right]=3 deque(value@index)=[3@1] right=2 a[right]=-1 deque(value@index)=[3@1, -1@2] -> window max 3 right=3 a[right]=-3 deque(value@index)=[3@1, -1@2, -3@3] -> window max 3 right=4 a[right]=5 deque(value@index)=[5@4] -> window max 5 right=5 a[right]=3 deque(value@index)=[5@4, 3@5] -> window max 5 right=6 a[right]=6 deque(value@index)=[6@6] -> window max 6 right=7 a[right]=7 deque(value@index)=[7@7] -> window max 7 answer = [3, 3, 5, 5, 6, 7]