Question 4(b)(i) 2019 · May-June · Paper 42 · 4 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (b)
(i)
Question 1
mark per shaded section
Question 4
Question 1
Question 2
Question 3
Question 4
Question 5
Question 5
Question 20
Question 12
Question 25
Question 32
Question 29
Question 1
Question 12
Question 12
Question 20
Question 2
Question 3
Question 4
Question 29
Question 29
Question 32
Question 1
Question 2
Question 3
Question 4
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
Question 19
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
