Sliding window

deque usage