3 ms·
A deque is an abstract data type, because it is defined by what you can do with it; what operations it supports. You can add and remove elements at either end o
by n1b0m 2y ago
A deque is an abstract data type, because it is defined by what you can do with it; what operations it supports. You can add and remove elements at either end of a deque.
A RingBuffer is a data structure, because it defined by how it is represented in memory, and how its state should be manipulated to fulfil the deque operations.
- PaulHoule 2y agoI looked at the source. Is it right that it overwrites when it reaches full capacity? That's scary! Aren't there concurrent versions of this that block writers until space frees up?