Past-paper question · 2014 October-November · Paper 32 · Q1(e)(iii)

Question 1(e)(iii) 2014 · October-November · Paper 32 · 2 marks

Original past-paper question for 1(E)(III)
Original past-paper question for 1(E)(III)
Original past-paper question for 1(E)(III)
Original past-paper question for 1(E)(III)
Original past-paper question for 1(E)(III)
Reveal official mark-scheme answer Official mark-scheme answer for 1(E)(III)

Official answer for Question 1

Part (e)

(iii)

(iii)

✓
Stack-A

Question 7

Question 6

Question 5

✓
TOS

Question 4

✓
3 CHIMP
✓
2 COW
✓
1 HORSE
✓
TOS points to 4

Question 1

✓
3 data items in correct order

Question 1

[2]

Mark scheme 9691_w14_ms_32.pdf →

Show text version of question

Question 1

Part (e)

(iii)

A
stack (Stack-A) and a queue (Queue-B) are to be implemented as follows:

Stack-A has a single pointer TOS which shows the index position available for the next new item to be added (‘pushed’) to the stack.

Queue-B is controlled by two pointers Head and Tail.

The diagram shows Stack-A and Queue-B after two items have been added to each.

Stack-A Queue-B

TOS String-2 Tail String-4 String-1 Head String-3

Stack-A and Queue-B are both initially empty.

Question 5

The sequence of six items of string data:

GOAT CAT SHEEP CHIMP COW HORSE

is stored on Stack-A.

(iii)

Show on the diagram below, the contents of Stack-A and its pointer at this stage

(Stage 3).

[2]

Stack-A Queue-B Stack-A

20 20 20

7 7 7 6 6 6 5 5 5 4 4 4 3 3 3 2 2 2 1 1 1 Stage 1 Stage 2 Stage 3

Topic relevance

Why this question appears here

71% assigned-topic match · Data types and structures › Introduction to abstract data types

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9691_w14_qp_32.pdf

Keep practising this topic