Input
Array (window highlighted)
Green = inside current window
| Orange = current i
| Blue bracket = window [l..r]
Monotonic Deque (front -> back, stores indices)
empty
Push (green)
| Pop back (red, smaller than incoming)
| Pop front (purple, expired)
Step Info
Press Step to advance one operation, or Play to auto-run.