Past-paper question · 2019 May-June · Paper 41 · Q2(b)

Question 2(b) 2019 · May-June · Paper 41 · 6 marks

Original past-paper question for 2(B)
Original past-paper question for 2(B)
Original past-paper question for 2(B)
Original past-paper question for 2(B)
Reveal official mark-scheme answer

Official answer for Question 2

Part (b)

Question 1

mark for each completed section

Question 6

✓
FUNCTION FindElement(Item : INTEGER) RETURNS INTEGER
✓
CurrentPointer ← RootPointer
✓
WHILE CurrentPointer <> NullPointer
✓
IF List[CurrentPointer].Data <> Item
✓
THEN
✓
CurrentPointer ← List[CurrentPointer].Pointer
✓
ELSE
✓
RETURN CurrentPointer
✓
ENDIF
✓
ENDWHILE
✓
CurrentPointer ← NullPointer
✓
RETURN CurrentPointer
✓
ENDFUNCTION

Mark scheme 9608_s19_ms_41.pdf →

Show text version of question

Question 2

Part (b)

Question 2

A computer games club wants to run a competition. The club needs a system to store the scores

achieved in the competition.

A
selection of score data is as follows:

Part (b)

The club also considers storing the data in the order in which it receives the scores as a

linked list in a 1D array of records.

The following pseudocode algorithm searches for an element in the linked list.

Complete the six missing sections in the algorithm.

FUNCTION FindElement(Item : INTEGER) RETURNS …………………………………………

…………………………………………… ← RootPointer

WHILE CurrentPointer …………………………………………… NullPointer

IF List[CurrentPointer].Data <> ……………………………………………

THEN

CurrentPointer ← List[……………………………………………].Pointer

ELSE

RETURN CurrentPointer

ENDIF

ENDWHILE

CurrentPointer ← NullPointer

………………………………………… CurrentPointer

ENDFUNCTION

[6]

Question 7

Topic relevance

Why this question appears here

82% assigned-topic match · Programming › Constructs

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 9608_s19_qp_41.pdf

Keep practising this topic