Skip to content

Monotonic deque [mp]

Micro pattern

Description

Keep candidate indices in decreasing value order so the front gives the current maximum.

Problems