Ch3-4-queue - DataStructureQueue SangYongHan...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Data Structure - Queue                 Sang Yong Han            http://ec.cse.cau.ac.kr/ Chung-Ang University Spring 2011 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Queue rear rear rear rear Stores a set of elements in a particular order Stack principle:  FIRST  IN  FIRST  OUT FIFO It means: the first element inserted is the first  one to be removed Example The first one in line is the first one to be  served
Background image of page 2
Queue Applications Real life examples Waiting in line Waiting on hold for tech support Applications related to Computer Science Threads Job scheduling (e.g. Round-Robin algorithm for  CPU allocation)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Queues Linear list. One end is called  front . Other end is called  rear . Additions are done at the rear only.  Removals are made from the front only.
Background image of page 4
A B A C B A D C B A D C B Rear front Rear front rear front rear front rear front First In First Out
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
front rear Q[0] Q[1] Q[2] Q[3] Comments -1 -1 -1 -1 0 1 -1 0 1 2 2 2 J1 J1 J2 J1 J2 J3 J2 J3 J3 queue is empty
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/13/2011 for the course DATA STRUC 101 taught by Professor Hansanyong during the Spring '11 term at 한동대학교.

Page1 / 24

Ch3-4-queue - DataStructureQueue SangYongHan...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online