Question 5(a)(iii) 2015 · October-November · Paper 22 · 1 mark
Reveal official mark-scheme answer

Official answer for Question 5
Part (a)
(iii)
(iii)
There were no swaps on the last pass / on pass 4
Question 22
Show text version of question
Question 5
Part (a)
(iii)
Question 5
A program is to process a set of integers.
The integers are stored in an array, Num. The first N elements are to be processed.
The pseudocode for this program is shown below:
FOR i ←1 TO (N - 1) j ←
Question 1
REPEAT IF Num[j] > Num[j + 1] THEN Temp ← Num[j] Num[j] ← Num[j + 1] Num[j + 1] Temp ← ENDIF j ← j + 1 UNTIL j = (N – i + 1) ENDFOR
(iii)
Describe what evidence from the trace table suggests that the given pseudocode is
inefficient.
...........................................................................................................................................
.......................................................................................................................................[1]
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_w15_qp_22.pdf
