跳到主要内容

考纲要点


9618 Syllabus Extract — Queue ADT

考点要求常见题型
Define a queue as an abstract data typeUnderstand FIFO principleTheory (Q1)
Implement a circular queue using a static arrayFixed-size array + pointersPractical (6–12 marks)
Enqueue operation with wrap-aroundMOD operatorCode writing (6 marks)
Dequeue operation with wrap-aroundMOD operatorCode writing (6 marks)
Distinguish full vs empty statesNumberOfItems counterCode + explanation (2–3 marks)
Initialise queue structurePointers at -1, items at NoneCode (1–2 marks)

必须掌握的能力

  1. Write Enqueue procedure from scratch
  2. Write Dequeue function from scratch
  3. Write IsFull / IsEmpty boolean functions
  4. Trace a circular queue through multiple enqueue/dequeue operations
  5. Explain why NumberOfItems is needed (not just pointer comparison)
  6. Identify when a queue is circular (look for MOD, NumberOfItems)

考试常见设问方式

设问分值提示词
"Write a procedure to add an item to the queue"6Enqueue, AddItem, Insert
"Write a function to remove and return an item"6Dequeue, RemoveItem, Pop
"State what is meant by a circular queue"2Explanation, diagram
"Explain why NumberOfItems is needed"2Full vs empty ambiguity
"Amend the linear queue to be circular"4Add MOD, add counter

与 Linear Queue 的考点对比

AspectLinear Queue考点Circular Queue考点
Pointer update+ 1 only(+ 1) MOD Size
Full conditionTail == Size - 1NumberOfItems == Size
Empty conditionHead == TailNumberOfItems == 0
Space reuse❌ Not tested✅ Key feature
Harder questionResizingWrap + counter logic

考纲分析

The circular queue typically appears in Section A of Paper 4 (Q1 or Q2). It is one of the most predictable 6-mark questions. The exam routine is almost always: "Write a procedure to enqueue an item into a circular queue" or "Write a function to dequeue an item from a circular queue".

Master this topic — it is a guaranteed 6 marks.