4. A builder is asked to replace the guttering on a house. The lengths needed, in metres, are
$$0.6,4.0,2.5,3.2,0.5,2.6,0.4,0.3,4.0 \text { and } 1.0$$
Guttering is sold in 4 m lengths.
- Carry out a quick sort to produce a list of the lengths needed in descending order. You should show the result of each pass and identify your pivots clearly.
- Apply the first-fit decreasing bin-packing algorithm to your ordered list to determine the total number of 4 m lengths needed.
- Does the answer to part (b) use the minimum number of 4 m lengths? You must justify your answer.