Completely Solved C, C++ Programs Assignment.




The Concept of Circular Queues

Filed Under: ,

The problem with the previous implementation is that the insert function gives a queue-full signal even if a considerable portion is free. This happens because the queue has a tendency to move to the right unless the ‘front’ catches up with the ‘rear’ and both are reset to 0 again (in the delete procedure). To overcome this problem, the elements of the array are required to shift one position left whenever a deletion is made. But this will make the deletion process inefficient. Therefore, an efficient way of overcoming this problem is to consider the array to be circular, as shown in Figure


Back to main directory:  Data Structure 


Get Free Programming Tutorials and Solved assignments