B
bintom
Is there any difference between a circular queue and a double-ended queue (deque)?
Is there any difference between a circular queue and a double-ended queue (deque)?
Is there any difference between a circular queue and a double-ended queue (deque)?
Yes.
V
Thanks Victor,
Now I need somebody else to tell me that difference ...
Thanks in advance.
Apart from all the theoretical differences, circular container types do
not fit into the STL framework well.
There is a good article concerning both these data structures
in wikipedia. The one is called Circular Buffer (to my knowledge
the same as what you refer to as circular queue). The other
deque/double-ended queue.
A circular buffer is typically used (IME) to buffer data
in communication layers. Writes and reads only take place in
one direction (refer to the wiki article).
Deques may grow in both directions, but can only grow from
the ends. You can read/write from the beginning or end.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.