An automated storage system tracks the heights (in decimetres) of four parcels waiting to be loaded onto a drone. The heights of the parcels, in the order they are stored, are:
[9,4,11,2] [9, 4, 11, 2] [9,4,11,2]Show the steps involved, for either the bubble sort algorithm or the merge sort algorithm, to sort these heights into ascending order so that the result is [2,4,9,11][2, 4, 9, 11][2,4,9,11].
Indicate which algorithm you have chosen by writing its name at the start of your answer:
52 exam-style questions on AQA GCSE Computer Science Sorting algorithms. Each one has a worked solution and a mark scheme showing where the marks go.