Quelpr

CAPE Computer Science Unit 2 · 2006 · Paper 1 · Question 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.

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 12(a)Identify the first number inserted into Q1.[1 mark]
  2. 12(b)State TWO ADT operations of a queue.[2 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