47Easy
0/1

An algorithm is represented in the pseudocode below:

1  scores[0] ← 1240
2  scores[1] ← 8500
3  scores[2] ← 4320
4  scores[3] ← 9100
5  FOR i ← 0 TO 2
6      FOR j ← 0 TO 2
7          IF scores[j + 1] > scores[j] THEN
8              temp ← scores[j]
9              scores[j] ← scores[j + 1]
10             scores[j + 1] ← temp
11         ENDIF
12     ENDFOR
13 ENDFOR

State the purpose of this algorithm.

[1]

Sorting algorithms Questions

Practise AQA GCSE Computer Science Sorting algorithms with exam-style questions for GCSE Computer Science. 62 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Sorting algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Sorting algorithms