Data Structures19 sections · 729 units
Open in Course

Quiz: Monotonic Deque

Maintenance rules

Check Your Understanding

In a monotonic deque for sliding window maximum, why do we remove smaller elements from the back when adding a new element?

  1. A.To save memory
  2. B.Because smaller elements can never be the maximum while the new larger element is in the window
  3. C.To maintain FIFO order
  4. D.Because the problem asks for minimum, not maximum
Start the roadmap to answer the quizzes and solve the challenges