Stacks - Quesues and Deques
Stacks - Quesues and Deques
Grade: 2
DR Sara S. Elhishi
Sara Shaker Elhishi
Queue
The Queue
Abstract
Data Type
• queue()
• enqueue(item)
13 • dequeue()
• is_empty()
• size()
Data Structure- Sara S. Elhishi
Implementing A
Queue In Python
• The implementation assumes that the rear is
at position 0 in the list.
15
Data Structure- Sara S. Elhishi
Problem Solving With Queues: Hot Potato Game
Data Structure- Sara S. Elhishi 16
Simulation and Implementation
ended queue • It does not require the LIFO and FIFO orderings