Data Structures19 sections · 729 units
Open in CourseQuiz: 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?
- A.To save memory
- B.Because smaller elements can never be the maximum while the new larger element is in the window
- C.To maintain FIFO order
- D.Because the problem asks for minimum, not maximum