Question 2(a) 2018 · May-June · Paper 43 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (a)
Question 1
mark for each completed statement
Question 7
Question 10
Question 11
Question 12
Question 13
Show text version of question
Question 2
Part (a)
Question 2
The array ItemList[1:20] stores data. A bubble sort sorts these data.
Part (a)
Complete the pseudocode algorithm for a bubble sort.
01 MaxIndex 20
02 NumberItems ........................................................................................................
03 FOR Outer 1 TO ..................................................................................................
04 FOR Inner 1 to NumberItems
05 IF ItemList[Inner] > ..............................................................................
06 THEN
07 Temp ItemList[ ........................................................................]
08 ItemList[Inner] ItemList[ ................................................]
09 ItemList[Inner + 1] .............................................................
10 ENDIF
11 ENDFOR
12 NumberItems ..................................................................................................
13 ENDFOR
Why this question appears here
82% assigned-topic match · Algorithm design and problem-solving › Algorithms
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_s18_qp_43.pdf
