“IMPLEMENTETION OF QUEUE”
Queue is a linear data structure in which items inserted at one end called ‘Rear’ and deleted from the other end called ‘Front’. Queue are based on the FIFO (first-in-first-out) principle that means the data item is insert first in the queue is also the first one to be removed from the queue
There are two operations on queue:
Insert/enqueue &Delete/dequeue.
The insert operation adds an element
at the rear end of the queue
while the delete operations removes
an element from the front end of
the queue
Queue implementation involves choosing thedata storage mechanism
for storing queue elements and implementing methods for performing
the two queue operations, insert and Like stacks, we can
implement queues by using arrays or linked lists
Comments
Post a Comment