Skip to main content
A-LevelComputer ScienceAlgorithm design and problem-solving9618/21 · Oct/Nov 2021 · Q212 Marks

An algorithm to sort a 1D array into ascending order is described as follows: • move the largest value to the end • keep repeating until the array is sorted. Apply the process of stepwise refinement to this algorithm in order to produce a more detailed description. Write the more detailed description using structured English. Your explanation of the algorithm should not include pseudocode statements.

  1. (a)An algorithm to sort a 1D array into ascending order is described as follows: • move the largest value to the end • keep repeating until the array is sorted. Apply the process of stepwise refinement to this algorithm in order to produce a more detailed description. Write the more detailed description using structured English. Your explanation of the algorithm should not include pseudocode statements.[6]
  2. (b)The program flowchart shown describes a simple algorithm. [Flowchart on page 6] Write pseudocode for the simple algorithm shown on page 6.[6]

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 2021). The mark or mark type is shown in brackets.

  1. [6] One mark for reference to:
  2. 1 The use a variable as an index to the array
  3. 2 A loop to iterate through the array
  4. 3 An Inner loop (with a reducing range)
  5. 4 Test if current element is greater than next element
  6. 5 if so then swap elements
  7. 6 Description of swap
  8. 7 Attempt at efficient algorithm
  9. Max 6 marks
  10. [6] Count ← 1
  11. Flag ← FALSE
  12. WHILE Flag = FALSE AND Count <= 5
  13. CALL ReBoot ()
  14. Count ← Count + 1
  15. Flag ← Check()
  16. ENDWHILE
  17. IF Flag = FALSE THEN
  18. CALL Alert(27)
  19. ENDIF
  20. One mark per point:
  21. 1 Initialisation of Count AND Flag
  22. 2 WHILE ... ENDWHILE // REPEAT ... UNTIL loop
  23. 3 ... including both conditions
  24. 4 Call ReBoot () AND increment Count inside the loop
  25. 5 Assign return value from Check() to Flag inside the loop
  26. 6 Final test of Flag AND call to Alert(27) not in a loop

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, 12 marks.
Source
A-Level Computer Science, Oct/Nov 2021 Paper 2 Variant 1, question 2.

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