What is a deque (double-ended queue)? | LetsGit.ITData Structureseasy
What is a deque (double-ended queue)?
Tags
#deque#queue#ring-buffer
Answer
A deque lets you add and remove elements from both the front and the back. With a ring buffer or linked list, these operations are O(1).
What is a monotonic queue and how does it solve sliding window max in O(n)? #deque#monotonic-queue#sliding-window