A2 June 2019 Q1

EdexcelCurrent spec8 marksAlgorithms

1.

2.11.73.01.93.21.23.31.41.50.2
(a) Use the first-fit bin packing algorithm to determine how the numbers listed above can be packed into bins of size 5 (2)

The list of numbers is now to be sorted into descending order.

(b) Perform a quick sort on the original list to obtain the sorted list. You should show the result of each pass and identify your pivots clearly. (4)

For a list of \(n\) numbers, the quick sort algorithm has, on average, order \(n\log n\).

Given that it takes 2.32 seconds to run the algorithm when \(n = 450\)

(c) calculate approximately how long it will take, to the nearest tenth of a second, to run the algorithm when \(n = 11\,250\). You should make your method and working clear. (2)