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
- LearnFirst in, first out
- LearnQueue operations
- CodeUsing a queue
- LearnImplementing a queue
- LabPrint queue lab
- CodeA circular queue in an array of 4
- CheckTrace a queue
- LearnWhere queues are used
- CheckStack or queue?
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 11 marks, with a self-marking markscheme.