+ 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

3rd Apr 2021, 10:13 PM
Shannon
1 Resposta
+ 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
4th Apr 2021, 12:58 PM
DHANANJAY PATEL
DHANANJAY PATEL - avatar