QUEUES In Data Structure

A queue is a linear list of elements in which deletion can take place only at one end, called the ‘front’ and insertion can take place only at the other end, called the ‘rear’. The term “front” and “rear” are used in describing a linear list only when it is implemented as a queue.
QUEUES In Data Structure
QUEUES In Data Structure


Queues are also called First-In-First-Out (FIFO) lists, since the first element in a queue will be the first element out of the queue. In other words, the order in which elements enter a queue is the order in which they leave.

Queues abound in everyday life. The people waiting in line at a bank form a queue, where the first person in line is the first person to be waited on.

An important example of a queue in computer science occurs in a time sharing system, in which programs with the same priority form a queue while waiting to be executed.

Powered by Blogger.