Opening discussion: review stacks and queues with the activities below

Queue operations:

  1. Create a new, empty queue q = Queue()
  2. Enqueue 302 to the queue q.enqueue(302)
  3. Enqueue 176 to the queue q.enqueue(176)
  4. Report the front of the queue q.first()
  5. Dequeue the queue q.dequeue()
  6. Enqueue 59 to the queue q.enqueue(59)
  7. Dequeue the queue q.dequeue()
  8. Check if the queue is empty q.isEmpty()
  9. Report the front of the queue q.first()
  10. Enqueue 2 to the queue q.enqueue(2)

Anatoliy Youssef Hari