Skip to main content
A-LevelComputer ScienceAlgorithm design and problem-solving9618/33 · May/June 2025 · Q127 Marks

An array is an Abstract Data Type (ADT).

  1. (a)Identify two other ADTs. 1 2[1]
  2. (b)A 1D array DataArray holds up to 1000 elements of type integer and needs to be sorted in ascending order. Write the pseudocode for an insertion sort to sort the array into ascending order. Use the identifiers from the table in your algorithm. You do not need to declare any arrays or variables for this algorithm. You may assume this has already been done. Identifier | Data type | Description ---|---|--- Index | INTEGER | counter for outer loop Position | INTEGER | counter for inner loop – insertion position DataArray | INTEGER | 1D array to store up to 1000 integers Value | INTEGER | value to insert The first line has been written for you. FOR Index ← 2 to 1000[4]
  3. (c)Describe two ways in which the performance of a sort routine is affected by the data to be sorted. 1 2[2]

Mark scheme

Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.

  1. [1] One mark for any two correct ADTs (Max 1)
  2. • Binary tree
  3. • Graph
  4. • Linked list
  5. • Queue
  6. • Stack
  7. [4] One mark for each marking point (Max 4)
  8. MP1 Temporary assignment of the element being 'inserted' before inner loop
  9. MP2 Appropriate inner loop
  10. MP3 Check if current DataArray content is > Value
  11. MP4 Moving data to adjacent element as required
  12. MP5 Appropriate updating of Position variable
  13. MP6 Re-insertion of the element outside the inner loop
  14. Example algorithm: FOR Index ← 2 to 1000 Value ← DataArray[Index] Position ← Index - 1 IF DataArray[Position] > Value THEN WHILE Position >= 1 AND DataArray[Position] > Value DataArray[Position + 1] ← DataArray[Position] Position ← Position - 1 ENDWHILE DataArray[Position + 1] ← Value ENDIF NEXT Index
  15. [2] One mark for each marking point
  16. MP1 The performance of a sorting routine should improve if the data is already partially sorted // The performance of a sorting routine is likely to be worse if the data is completely out of order
  17. MP2 The sort may take longer if the number of items to be sorted is larger // The sort may take less time if the number of items to be sorted is fewer.

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Algorithm design and problem-solving, A-Level Computer Science (syllabus 9618). Structured question, 7 marks.
Source
A-Level Computer Science, May/June 2025 Paper 3 Variant 3, question 12.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep