logging in or signing up QUEUE data structure aSGuest139035 Download Post to : URL : Related Presentations : Let's Connect Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Copy embed code: Embed: Flash iPad Dynamic Copy Does not support media & animations Automatically changes to Flash or non-Flash embed WordPress Embed Customize Embed URL: Copy Thumbnail: Copy The presentation is successfully added In Your Favorites. Views: 1696 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: July 08, 2012 This Presentation is Public Favorites: 2 Presentation Description queue in data structure Comments Posting comment... Premium member Presentation Transcript Anoop joseph: Free Powerpoint Templates QUEUE Anoop josephPowerPoint Presentation: Queue Ordered collection of homogeneous elements Non-primitive linear data structure. A new element is added at one end called rear end and the existing elements are deleted from the other end called front end . This mechanism is called First-In-First-Out (FIFO). Total no of elements in queue= rear – front +1: Fig: Models of a QueueOperations On A Queue: Operations On A Queue 1 . To insert an element in queue 2 . Delete an element from queueThe Queue Operation: The Queue Operation Placing an item in a queue is called “insertion or enqueue ”, which is done at the end of the queue called “rear”. Front RearThe Queue Operation: The Queue Operation Removing an item from a queue is called “deletion or dequeue ”, which is done at the other end of the queue called “front”. Front RearAlgorithm QINSERT (ITEM) : Algorithm QINSERT (ITEM) 1. If (rear = maxsize-1 ) print (“queue overflow”) and return 2 . Else rear = rear + 1 Queue [rear] = itemAlgorithm QDELETE () : Algorithm QDELETE () 1. If (front =rear) print “queue empty” and return 2. Else Front = front + 1 item = queue [front]; Return itemQueue Applications: Queue Applications Real life examples Waiting in line Waiting on hold for tech support Applications related to Computer Science Round robin scheduling Job scheduling (FIFO Scheduling) Key board buffer3 states of the queue : 3 states of the queue 1. Queue is empty FRONT=REAR 2. Queue is full REAR=N 3. Queue contains element >=1 FRONT<REAR NO. OF ELEMENT=REAR-FRONT+1Representation Of Queues: Representation Of Queues 1. Using an array 2. Using linked list You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.