Queue Using Arrays
Queue Using Arrays
Queue Using Arrays
: 26
og Am
mpprt ova io. Darta Input tream
elass eue
maxSi z e = S;
q e Aray= ew
kovng EmaxSizel;
tront= O;
ear =
ltemS = 0
rear -1
g ue Avray C++ Teav
TSbakshniTOomen'sDegree College
Deparlment of Gompulerdcience Page No.: 27
nIt enms +t
publicong remove ()
nItems
Teturn tem p
class aueue
ueue eue(5)
int ch
do
Sy6tem -out. pTint ln 1Tnsert \m ")
System. out. println C "a. Delete \n");
system. out.print Ln ("a. rint \n ");
system. out.print kn (Eter your ehoice "
ch=
teger. parse Tut (in.reod Line C);
Suoiteh Cch)
break
Cose 2
6.remóve (
brea k
Cose 8 S S. psint();
rCak
whtle Cche+);
Output
tInsert
2. Delete
3. r i n t
w .-
. Inset
2.DeLete
3. P i n t
Tnset
2. Delete
3 Psint
USLakshmiComen'sDegree Gollege