Skip to main content
O-LevelComputer ScienceAlgorithm design and problem-solving2210/22 · Oct/Nov 2025 · Q513 Marks

This flowchart represents an algorithm. [Figure 5.1]

  1. (a)The first data row of the trace table shows the values currently stored in CodeStore[] Complete the trace table for the algorithm, using the input data: 7686, Face, Speed, 432U, Yp79 Code Store Count CodeStore[] [1] [2] [3] [4] [5] [6] OUTPUT aBcd 1532 Face 63q8[6]
  2. (b)Describe the processes in the algorithm on page 6.[3]
  3. (c)The algorithm on page 6 requires the array CodeStore[] to be declared as a one-dimensional (1D) string array with six elements that are initially set to the null string "". Write the pseudocode required to declare and initialise the array CodeStore[] You do need to declare any variables used.[4]

This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.

Mark scheme

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

  1. [1] MP1 Correct Code column
  2. [1] MP2 Correct Store column
  3. [1] MP3 Correct Count column
  4. [1] MP4 First four CodeStore columns left unchanged
  5. [1] MP5 Correct CodeStore[5] and CodeStore [6] columns
  6. [1] MP6 Correct OUTPUT column
  7. Code Store Count | [1] [2] [3] [4] [5] [6] | OUTPUT
  8. ---------------------------------------------------------------------------------
  9. | aBcd 1532 Face 63q8
  10. 7686 FALSE 1 | aBcd 1532 Face 63q8
  11. 2 | aBcd 1532 Face 63q8
  12. 3 | aBcd 1532 Face 63q8
  13. 4 | aBcd 1532 Face 63q8
  14. TRUE 5 | aBcd 1532 Face 63q8 7686 | 7686
  15. 6 | aBcd 1532 Face 63q8 7686 |
  16. Face FALSE 1 | aBcd 1532 Face 63q8 7686 | Code used before
  17. Speed | aBcd 1532 Face 63q8 7686 | Length must be 4
  18. 432U FALSE 1 | aBcd 1532 Face 63q8 7686 |
  19. 2 | aBcd 1532 Face 63q8 7686 |
  20. 3 | aBcd 1532 Face 63q8 7686 |
  21. 4 | aBcd 1532 Face 63q8 7686 |
  22. 5 | aBcd 1532 Face 63q8 7686 |
  23. TRUE 6 | aBcd 1532 Face 63q8 7686 432U | 432U
  24. 7 | aBcd 1532 Face 63q8 7686 432U |
  25. Yp79 FALSE 1 | aBcd 1532 Face 63q8 7686 432U | CodeStore full
  26. [1] MP1 Checks that the length of the code input is 4 characters.
  27. [1] MP2 Checks the code against the array contents to see if it has been used before (in the last 6 codes)
  28. [1] MP3 If the code passes the tests, it is stored in the array
  29. [1] MP4 Stores the code in the lowest available index
  30. [1] MP5 Checks that the code store isn't full before storing a new code // Outputs a code store is full message if appropriate // Algorithm continues until the code store is full.
  31. [1] MP1 Declaration of array using correct name and data type
  32. [1] MP2 Declaration of loop counter
  33. [1] MP3 Use of appropriate loop for six iterations (allow any type of loop)
  34. [1] MP4 Assignment of all array elements to null string (using loop counter as array index)
  35. [4] Example: DECLARE CodeStore : ARRAY[1:6] OF STRING DECLARE Index : INTEGER FOR Index ← 1 TO 6 CodeStore [Index] ← "" NEXT Index

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, O-Level Computer Science (syllabus 2210). Structured question, 13 marks.
Source
O-Level Computer Science, Oct/Nov 2025 Paper 2 Variant 2, question 5.

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