An algorithm is represented in the pseudocode below:
1 nums[0] ← 15
2 nums[1] ← 42
3 nums[2] ← 8
4 nums[3] ← 23
5 FOR x ← 0 TO 2
6 FOR y ← 0 TO 2
7 IF nums[y + 1] < nums[y] THEN
8 temp ← nums[y]
9 nums[y] ← nums[y + 1]
10 nums[y + 1] ← temp
11 ENDIF
12 ENDFOR
13 ENDFOR
State the purpose of this algorithm.