7 The numbers 17, 3, 16 and 4 are to be sorted into ascending order.
The following four methods are to be compared: bubble sort, shuttle sort, Shell sort and quick sort (with the first number used as the pivot).
A student uses each of the four methods and produces the correct solutions below. Each solution shows the order of the numbers after each pass.
| \multirow[t]{4}{*}{Solution 1} | 17 | 3 | 16 | 4 |
| 3 | 17 | 16 | 4 |
| 3 | 16 | 17 | 4 |
| 3 | 4 | 16 | 17 |
| \multirow[t]{3}{*}{Solution 2} | 17 | 3 | 16 | 4 |
| 16 | 3 | 17 | 4 |
| 3 | 4 | 16 | 17 |
| \multirow[t]{4}{*}{Solution 3} | 17 | 3 | 16 | 4 |
| 3 | 16 | 4 | 17 |
| 3 | 16 | 4 | 17 |
| 3 | 4 | 16 | 17 |
| \multirow[t]{4}{*}{Solution 4} | 17 | 3 | 16 | 4 |
| 3 | 16 | 4 | 17 |
| 3 | 4 | 16 | 17 |
| 3 | 4 | 16 | 17 |
- Write down which of the four solutions is the bubble sort, the shuttle sort, the Shell sort and the quick sort.
- For each of the four solutions, write down the number of comparisons and swaps (exchanges) on the first pass.