Circular Queues

Hey guys. Could anyone point me to some reference material concerning circular queues, or try to explain them here. I've got a project that requires reversing/rotating the circular queue, but I don't even fully understand the concept yet. I understand how to do this with a linked list, but not in an array.
Last edited on
Thanks, Albatross. Those were helpful. It sounds similar to a circular linked list except that it can't grow past its bounds.

Do you know where I could find some basic examples? Also, do you know how you would rotate the array without using a temporary variable? This seems illogical to me right now without some kind of temporary storage.
You can just move the pointer which defines the beginning of the queue
Wikipedia solves all knowledge problems. At least, almost all. See if this and this article in general help.
http://en.wikipedia.org/wiki/Circular_queue#Exemplary_POSIX_Implementation

-Albatross
I wouldn´t give Jimbo s´ encyclopedia as a reference.It is dull written,full of links specially set so that the reader opens as many pages as possible,and the explanations are often bloated and overcomplicated,because the very smart guys writing the articles want to show everyone how smart they are.If its not "google it" it has to be wikipedia.Lol.Seriously.
@above
Wikipedia is one of the best encyclopedias available, the links are the sources of the info so you can get a deeper knowledge
If you find it too difficult, go to simple.wikipedia.org ( instead of en.wikipedia.org )
Deeper Knowledge? Its like you want to know the biography of Newton and you end up on the LHC page.Seriously.Plus,i think a spambot probably has more charisma and writing skills than those editors.Plus,everything on wikipedia can be found on the web with better authors and real experts.I could write a reductio ad absurdum to show you that there is no need for bloated encyclopedias full of links,but im sure you already know what i mean.
Last edited on
Topic archived. No new replies allowed.