What did you learn? Monotonic deques find extrema (max or min) over sliding windows in .
Store indices, not values. You need indices to check if elements are in the current window.
Two maintenance operations: remove old elements from front (outside window), remove dominated elements from back (can't be the answer).
The front always holds the answer for the current window. This pattern applies to any "sliding window extremum" problem.