Quelpr

CAPE Computer Science Unit 2 · 2006 · Paper 1 · Question 12(a)

Five elements were sequentially inserted into an empty queue Q1 as shown in Figure 1.

Identify the first number inserted into Q1.

This question uses a figure or table from the paper — you'll see it when you practise.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 12(b)State TWO ADT operations of a queue.[2 marks]
  2. 12(c)Write an algorithm using only queue ADT operations to remove all elements from Q1 and insert them into an initially empty queue Q2.[5 marks]
  3. 12(d)Draw a diagram showing the elements of Q2 after three elements have been transferred from Q1 to Q2.[2 marks]

More practice: the rest of this paper · more Abstract Data Types (ADTs) questions · all CAPE Computer Science Unit 2 past papers