Site hosted by Angelfire.com: Build your free website today!


QUEUE
The Lair Data Structures Main
Topics:

Stack

Queue

Linked Lists

Tree

More to Come!

IMPLEMENTATION EXAMPLES:

QUEUE:

DEFINITION:

- A queue is one of the most commonly used data structures. In a queue, insertion of data is done at one end while the deletion of data is done at the other end. Queue follows a First-In First-Out (FIFO) approach or you can say first come first served. Most queues are implemented using arrays, classes, or structures. A good example of something using a queue would be a printer. It prints out things according to where they are in the queue. The first project to be sent to the printer is the first in and so will be the first out.

OPERATIONS:

  • ENQUEUE - This is the operation of adding an item to the rear of the queue
  • DEQUEUE - This is the operation used to remove an item from the front of the queue.
  • ISEMPTY() - This is used to check to see if the queue is empty
  • ISFULL() - This is used to check to see if the queue is full

WAYS TO IMPLEMENT A QUEUE:

  • Using Arrays
  • Using Structures
  • Using Classes
  • Using STL
  • Using Linked Lists