6 This list is to be sorted into decreasing order, ending up with 31 in the first position and 4 in the last position.
15
4
12
23
14
16
27
31
Initially bubble sort is used.
- Record the list at the end of the first, second and third passes. You do not need to show the individual swaps in each pass.
After the fourth pass the list is:
23
15
16
27
31
14
12