All challenges
Multiple ChoiceIntermediate 30s

Monotonic queue

A monotonic queue maintains:
Options
  1. 1All elements fully sorted each step
  2. 2Random order, no ordering guarantee
  3. 3Priority set by insertion time only
  4. 4Min/max in sliding window in O(n)

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle