CodeMosa
Master LeetCode Patterns
All Patterns
Collections
Sign In
Back
Monotonic Deque
Question 1 of 12
8% Complete
Hard
Why use a deque instead of a stack for sliding window maximum?
A
Need to remove elements from front when they leave the window
B
Deque is faster than stack
C
Deque uses less memory
D
Stack can't maintain monotonic property
Need a hint?
Think about removing elements from both ends