B2.2 Data structuresB2.2.4

Queue as a 'first in, first out' (FIFO) data structure

Explain the concept of a queue as a 'first in, first out' (FIFO) data structure

SL + HL≈ 50 minCommand term: ExplainPremium

In this lesson

  • Explaining FIFO behaviour and the operations enqueue, dequeue, front and isEmpty
  • Tracing a sequence of queue operations, including a circular array
  • Explaining uses of queues: print jobs, playlists, network packets, process scheduling
  • Choosing between a stack and a queue for a task

This lesson is part of Premium

Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.

What's inside

  1. LearnFirst in, first out
  2. LearnQueue operations
  3. CodeUsing a queue
  4. LearnImplementing a queue
  5. LabPrint queue lab
  6. CodeA circular queue in an array of 4
  7. CheckTrace a queue
  8. LearnWhere queues are used
  9. CheckStack or queue?
  10. ExamWorked exam answer
  11. ReviewMistakes examiners see
  12. Exam practiceExam-style questions

Ends with 4 exam-style questions worth 11 marks, with a self-marking markscheme.