Sorting algorithms

EasyMediumHard
12345678910111213141516171819202122
Question 18
Easy

An algorithm designed to process telemetry data is represented in the pseudo-code below:

1  records[0] ← 84
2  records[1] ← 92
3  records[2] ← 57
4  records[3] ← 71
5  FOR i ← 0 TO 2
6      FOR j ← 0 TO 2 - i
7          IF records[j + 1] < records[j] THEN
8              temp ← records[j]
9              records[j] ← records[j + 1]
10             records[j + 1] ← temp
11         ENDIF
12     ENDFOR
13 ENDFOR

State the purpose of this algorithm.

[1]

Sorting algorithms Questions

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