17 & 9 & 15 & 8 & 20 & 13 & 28 & 4 & 12 & 5
\end{array}$$
The numbers in the list shown above are the weights, in kilograms, of ten boxes. The boxes are to be transported in containers that will each hold a maximum weight of 40 kilograms.
- Calculate a lower bound for the number of containers that will be needed to transport the boxes. You must show your working.
- Use the first-fit bin packing algorithm to allocate the boxes to the containers.
- Using the list provided, carry out a quick sort to produce a list of the weights in ascending order. You must make your pivots clear.
- Use the binary search algorithm to try to locate the weight of 9 in the sorted list. Clearly indicate how you choose your pivots and which part of the list is being rejected at each stage.