Question 3(a)(iii) 2015 · May-June · Paper 23 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
(iii)
(iii)
2 iterations
Show text version of question
Question 3
Part (a)
(iii)
Meena has written the algorithm below and wants to check that it works correctly.
FOR i ← 1 TO 4 FOR j ← 1 TO 4 IF Numbers[j] > Numbers[j + 1] THEN w ← Numbers[j] Numbers[j] ← Numbers[j + 1] Numbers[j + 1] ← w ENDIF ENDFOR ENDFOR
(iii)
State how many iterations of the outer loop have occurred before there are no more
changes to the contents of the array.
.......................................................................................................................................[1]
Why this question appears here
71% 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 9691_s15_qp_23.pdf
