Past-paper question · 2019 May-June · Paper 42 · Q4(b)(i)

Question 4(b)(i) 2019 · May-June · Paper 42 · 4 marks

Original past-paper question for 4(B)(I)
Original past-paper question for 4(B)(I)
Original past-paper question for 4(B)(I)
Original past-paper question for 4(B)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 4(B)(I)

Official answer for Question 4

Part (b)

(i)

Question 1

mark per shaded section

Question 4

✓
ArrayData
✓
Count
✓
TempValue
✓
Sorted
✓
0

Question 1

Question 2

Question 3

Question 4

Question 5

✓
0
✓
""
✓
TRUE

Question 5

Question 20

Question 12

Question 25

Question 32

Question 29

Question 1

Question 12

✓
FALSE

Question 12

Question 20

Question 2

Question 3

Question 4

Question 29

✓
(FALSE)

Question 29

Question 32

✓
0
✓
TRUE

Question 1

Question 2

Question 3

Question 4

✓
9608/42
✓
Cambridge International AS/A Level – Mark Scheme
✓
May/June 2019
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s19_ms_42.pdf →

Show text version of question

Question 4

Part (b)

(i)

The following is an example of a sorting algorithm. It sorts the data in the array ArrayData.

01 TempValue "" 02 REPEAT 03 Sorted TRUE 04 FOR Count 0 TO 4 05 IF ArrayData[Count] > ArrayData[Count + 1] 06 THEN 07 TempValue ArrayData[Count + 1] 08 ArrayData[Count + 1] ArrayData[Count] 09 ArrayData[Count] TempValue 10 Sorted FALSE 11 ENDIF 12 ENDFOR 13 UNTIL Sorted = TRUE

(i)

Complete the trace table for the algorithm given in part (b), for the ArrayData values

given in the table.

ArrayData Count TempValue Sorted 0 1 2 3 4 5

5 20 12 25 32 29

[4]

Question 19

Topic relevance

Why this question appears here

92% 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_42.pdf

Keep practising this topic