3.
$$\begin{array} { l l l l l l l l l l }
1.1 & 0.7 & 1.9 & 0.9 & 2.1 & 0.2 & 2.3 & 0.4 & 0.5 & 1.7
\end{array}$$
- Use the first-fit bin packing algorithm to determine how the numbers listed above can be packed into bins of size 3
The list is to be sorted into descending order.
- Starting at the left-hand end of the list, perform one pass through the list using a bubble sort. Write down the list that results at the end of your first pass.
- Write down the number of comparisons and the number of swaps performed during your first pass.
After a second pass using this bubble sort, the updated list is
$$\begin{array} { l l l l l l l l l l }
1.9 & 1.1 & 2.1 & 0.9 & 2.3 & 0.7 & 0.5 & 1.7 & 0.4 & 0.2
\end{array}$$
- Use a quick sort on this updated list to obtain the fully sorted list. You must make your pivots clear.
- Apply the first-fit decreasing bin packing algorithm to your fully sorted list to pack the numbers into bins of size 3