Question 3(a) 2018 · October-November · Paper 42 · 7 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
Question 1
mark for each completed statement:
Question 7
Show text version of question
Question 3
Part (a)
Question 3
A bubble sort algorithm is used to sort an integer array, List. This algorithm can process arrays
of different lengths.
Part (a)
Write pseudocode to complete the bubble sort algorithm shown.
01 FOR Outer ..................................................................................... TO 0 STEP - 1
02 FOR Inner 0 TO (.........................................................................................)
03 IF .............................................................. > ....................................................
04 THEN
05 Temp ..................................................................
06 List[Inner] ....................................................................
07 List[Inner + 1] .........................................................................
08 ENDIF
09 ENDFOR
10 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_w18_qp_42.pdf
