+ 1
Circular queue
Does anyone have any advice or tips when implementing a circular queue? I canât seem to understand the logic behind it
1 Answer
+ 1
Shannon
Circular queue has two references
> Read current read location
> Write current write location
Circular queue has fix size.
What is important needs to be identified first
Reason
How to move with read and write reference
> Overwrite existing data
> Empty queue
> Memory is flat as opposit to
circular nature of
implementation
> Read and Write data single
at a time or in chunk of it
at a time
Circular queue can be empty even though references Read and Write never match both needs be distinct
DHANANJAY