Mental Model
Keep track of the largest values in the current window using a special list that quickly removes smaller values.
Analogy: Imagine a line of people waiting to enter a room, but only the tallest people stay in line because shorter ones behind them can't be the tallest in the room.
Array: [2, 1, 3, 4, 6, 3, 8, 9, 10, 12, 56] Window size k=4 Deque stores indexes of elements in decreasing order of values Example: Deque: [4, 5] -> means values [6, 3] Window: [3, 4, 6, 3]
