Core Idea
The minimum of each window can be maintained with a deque of candidate indices. The deque keeps values in increasing order.
Algorithm
Before adding a new index, remove larger values from the back. Remove indices from the front once they leave the current window.
Common Mistakes
Store indices, not only values, so expired elements can be detected. Output a value only after the first full window has been formed.