C Programming and Data Structures: Unit III: b. Linear Data Structures Stacks and Queues

Concept of Queue

Definition, Example | Linear Data Structures

The queue can be formally defined as ordered collection of elements that has two ends named as front and rear. From the front end one can delete the elements and from the rear end one can insert the elements.

Part II: Queues

Concept of Queue

• Definition :

The queue can be formally defined as ordered collection of elements that has two ends named as front and rear. From the front end one can delete the elements and from the rear end one can insert the elements.

• For Example :

The typical example can be a queue of people who are waiting for a city bus at the bus stop. Any new person is joining at one end of the queue, you can call it as the rear end. When the bus arrives the person at the other end first enters in the bus. You can call it as the front end of the queue.

Following Fig. 4.8.1 represents the queue of few elements


 

C Programming and Data Structures: Unit III: b. Linear Data Structures Stacks and Queues : Tag: : Definition, Example | Linear Data Structures - Concept of Queue