1 The list below is to be sorted into increasing order using bubble sort, starting at the left-hand end of the list.
$$\begin{array} { l l l l l l }
24 & 57 & 9 & 31 & 16 & 4
\end{array}$$
- Show which values are compared and which are swapped in the first pass. Write down the list that results at the end of the first pass.
- Without showing the individual comparisons and swaps, write down the lists that result after the second pass and after the third pass.
- In total there will be five passes made in carrying out bubble sort on the list. Write down how many swaps are made in each pass.