May/June 2026 Paper 21

2026 · 12 questions · 20 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong20Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
Q1–/1 mk
Q2–/4 mks
Q3–/3 mks
Q4–/4 mks
Q6–/4 mks
Q7–/4 mks
Q8–/7 mks
Q10–/9 mks
Q11–/5 mks
Q12–/15 mks
4Sorting AlgorithmsMedium4 marks
The following pseudocode algorithm uses a bubble sort to sort the array Names[50].
Complete the algorithm by choosing the missing item for each of the four blanks.
pseudocode
Last ← ____REPEAT    Swap ← ____    FOR ____ ← 1 TO Last - 1        IF Names[Index] > Names[Index + 1]          THEN            Temp ← Names[Index]            Names[Index] ← Names[Index + 1]            Names[Index + 1] ← Temp            Swap ← TRUE        ENDIF    NEXT Index    Last ← Last - 1UNTIL ____ Swap OR Last = 1
Last ←
Swap ←
FOR
← 1 TO Last - 1 UNTIL
Swap OR Last = 1