Figure 1 shows a sorting algorithm written in pseudocode.
1 items ← [9, 3, 7, 2]
2 n ← 4
3 swapped ← true
4 WHILE swapped = true
5 swapped ← false
6 FOR j ← 0 TO n - 2
7 IF items[j] > items[j + 1] THEN
8 temp ← items[j]
9 items[j] ← items[j + 1]
10 items[j + 1] ← temp
11 swapped ← true
12 ENDIF
13 ENDFOR
14 ENDWHILE
State one advantage of the merge sort algorithm compared to the sorting algorithm shown in Figure 1.