Sunday, March 8, 2009

QUEUES

QUEUES
is simply a waiting line that grows by adding elements to its end and shrinks by taking elements from its front. Unlike a stack, a queue is a structure in which both ends are used: one for adding new elements and one for removing them.Therefore, the last element has to wait until all elements preceding it on the queue are removed. A queue is an FIFO structure:first in/first out.

Queue operation are similar to stack operations. The following operations are needed to properly manage a queue:

No comments:

Post a Comment