Monotonic deque [mp]
Micro pattern¶
Description¶
Keep candidate indices in decreasing value order so the front gives the current maximum.
Problems¶
- 239. Sliding Window Maximum (Top Hard)
Keep candidate indices in decreasing value order so the front gives the current maximum.