CS201 Pratice Queue Problems

Work the following Queue Problems. (When working queue problems initialize Front to 0 and rear to -1)

0  
1  
2  
3  

Front=
Rear=

Enqueue Mike
Enqueue Gary
Enqueue John
Dequeue=> ______

Enqueue Tom
Dequeue=> ______
Dequeue=> ________
L.O. _______________
Enqueue Henry
L.O. ________________

0  
1  
2  
3  

Front=
Rear=

Enqueue Chuck

Enqueue Ed
Dequeue => ________
Enqueue Kevin
Enqueue Larry
Enqueue David
Dequeue => _________
Enqueue Steve
Enqueue Tom

L.O. __________________


0  
1  
2  
3  

Front=
Rear=

Enqueue Gary
Enqueue John
Dequeue=> ______
Enqueue Henry

Enqueue Tom
Dequeue=> ______
Dequeue=> ________
L.O. _______________
P.O. ________________

0  
1  
2  
3  

Front=
Rear=

Enqueue Ed
Dequeue => ________
Enqueue Larry
Enqueue David
Dequeue => _________
Enqueue Steve
Enqueue Tom

L.O. __________________



0  
1  
2  
3  

Front=
Rear=

Enqueue Mike
Enqueue Gary
Enqueue John

Enqueue Tom
Dequeue=> ______

Dequeue=> ______
Dequeue=> ________
L.O. _______________
Enqueue Henry
L.O. ________________

0  
1  
2  
3  

Front=
Rear=

Enqueue Chuck
Enqueue Ed
Dequeue => ________
Dequeue => ________
Enqueue Kevin
Enqueue Larry
Enqueue David
Dequeue => _________
Enqueue Steve
Enqueue Tom
P.O. __________________
L.O. __________________