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.
52 exam-style questions on AQA GCSE Computer Science Sorting algorithms. Each one has a worked solution and a mark scheme showing where the marks go.