Five rows of 10 adjacent boxes, each box containing a number, are shown. The boxes are labeled a[0] through a[9] from left to right. The numbers in the top row are 8, 6, 10, 2, 16, 4, 18, 14, 12, 20, respectively.

In the second row, arrows indicate the exchange of the 8 in a[0] with the 2 in a[3]. The third row shows the new sequence: 2, 6, 10, 8, 16, 4, 18, 14, 12, 20.

In the fourth row, arrows indicate the exchange of the 6 in a[1] with the 4 in a[5]. The fifth row shows the new sequence: 2, 4, 10, 8, 16, 6, 18, 14, 12, 20.