07.11.2020 Views

SEComp._D.S.5_DhruvDKrishnan_B-23

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3nl26 Experimert no: 5 Grculdr Queue

TLeor

nea Circ ular auue is alse a

linear data sfructure

whic fallaws the FIE.O principle , but instead

nghe queue at he last pasition it again

starts ran he first pas ition afier he last, hence

makia tbe queue bebave hke a circular dota structure

Basiceatures

1In the-t0se case

w

w

ot circular queue,hea d pointe

awaus point to the frot ot the queue , ánd

he tailpointer will aluaus pointto the end o-fE

the aueue

Initial he head and the tail poinBers ill be pointing

Ho the same locatioR,this wauld meanthat tke

queue is emp-

Ta

Head

3 New dalai alwas added Ao Le locion poin tedd

by the toil painter, grd, aNe the daa is added, F the

tail poiter is incrememted to the next_available

lo cation

4Ina Circular queue, data is not actuallremaved

from the queue: Onlythe head paintor js. incrermeted

by one positionwPh, degueue js executgAs he

FOR EDUCATIONAL USE

undaram)


queue data is only the data bedwegn bead and tail

ence he Aata lelt outside is hoa part o

the 9,ueue anumera berce ee geat is romOved

V

Le bead ond the tal pointer wll et reinitialised

to0 everytl me they reach he end Ct the

4ueue

ApplicatOns

1 npute

Linea r Queue Circular Queue

Oraanises the data elemests Data isarrahaed in a

and instructtons iba sea

ord er_one atter the anathe

Vew e lerert is added fro

the rear end ond removd

from the ho

CIYCu arpottern where the

ast elempnt is conne cted

to the fird elemet

Insertion and deletion an

be denee at anypostion

Sundaram

FOR EDUCATIONAL USE

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!