Program to implement Circular Queue using Array

Circular queue may be viewed as the array that holds the queue elements in circular rather than as a straight line. That means we may imagine that the first element of the array immediately follows the last elements.

Program of queue using Linked List

As in Stacks, a queue could be implemented using a Linked List. A queue can be implemented by the following declarations and algorithms:

Program of queue using array

To represent(create) a queue we require a one dimensional array of some maximum size(int queue_arra[MAX];)  to hold the data items and two other variable (int rear = -1;int front = -1;) to point to the beginning and the end of the queue.

What is Data Structure?

Data Structure is the branch of computer science that unleaches(set free) the knowledge of how the data should be organized, how the flow of data should be controlled and how a data structure should be designed and implemented to reduce the complexity and increase the efficiency of the algorithm.

Page 4 of 4