Monday 20 May 2013

Queue Through Link List

A queue is somewhat differs from the stack.It is also a container of data but follows the FIFO(First In First Out) principle.
In queue, the insertion takes place from the rear of the queue and the removal from the from the front of the queue.For Example,you may have seen a line of people to pay their bills on the billing counter.What happens there is that the person who is on the front of the line, pays his bill and leave that space.Whereas the people keep coming and stand in the line for their turn from the back of the line.This is the same pattern of the queue.
Insertion of element is known as Enqueue and removal is known Dequeue.
Here is a Queue program implemented through link list.

DOWNLOAD QUEUE THROUGH LINK LIST

No comments:

Post a Comment