May/June 2026 Paper 31

2026 · 11 questions · 28 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong28Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
10(a)Sorting AlgorithmsHard5 marks
An insertion sort algorithm is used to sort the unique ID numbers of club members into ascending order. These unique ID numbers are kept in a 1D array MemberID. The corresponding names of the members are stored in a 1D array Names. The arrays are declared as: DECLARE MemberID : ARRAY[0:499] OF INTEGER DECLARE Names : ARRAY[0:499] OF STRING The following table defines the variables to be used in this algorithm.
identifierdata typedescription
Countintegermain loop counter to iterate through the whole array
Temp1integertemporary holding location for current member ID
Temp2stringtemporary holding location for current member name
Insertintegercounter to show current insertion position
Write the pseudocode for an insertion sort to arrange the unique ID numbers into ascending order. Make sure that the data in both arrays is swapped as required so that data with the same index continues to apply to the same person. Use the given identifiers. Assume all variables have been declared.

Answer

0 words
10(b)Algorithm Efficiency Big OMedium3 marks
Describe the factors, other than changing the algorithm, that affect the time efficiency of the insertion sort algorithm.

Answer

0 words
10(c)Algorithm Efficiency Big OEasy1 mark
State the Big O notation for the worst-case time complexity of the insertion sort.