1.8 1.4 2.6 1.6 2.8 0.9 3.1 0.8 1.2 2.4 0.6
Use the first-fit bin packing algorithm to determine how the numbers listed above can be packed into bins of size 5
The list is to be sorted into descending order.
(i) Perform one pass of a bubble sort, starting at the left-hand end of the list. You must write down the list that results at the end of the first pass.
(1 mark)
(ii) Write down the number of comparisons and the number of swaps performed during the first pass.
(2 marks)
After a second pass using this bubble sort, the updated list is
2.6 1.8 2.8 1.6 3.1 1.4 1.2 2.4 0.9 0.8 0.6
Use a quick sort on this updated list to obtain the fully sorted list in descending order. You must make your pivots clear.
Apply the first-fit decreasing bin packing algorithm to the fully sorted list to pack the numbers into bins of size 5










