Figure 13 shows an algorithm represented in pseudocode.
A developer wants to check the algorithm works correctly.
Line numbers are included but are not part of the algorithm.
Figure 13
1 arr[0] 'c'2 arr[1] 'b'3 arr[2] 'a'4 FOR i 0 TO 15 FOR j 0 TO 16 IF arr[j + 1] < arr[j] THEN7 temp arr[j]8 arr[j] arr[j + 1]9 arr[j + 1] temp10 ENDIF11 ENDFOR12 ENDFOR
State the purpose of the algorithm.
Did this page help you?


