A seismologist is analyzing the arrival times (in seconds past midnight) of P-waves at eight different sensors. The recorded times are:
| 14 | 5 | 23 | 11 | 19 | 8 | 17 | 3 |
To order these times, the seismologist uses a merge sort algorithm.
Complete the table below to show how the merge sort algorithm operates on this list of arrival times.
The first row shows the starting array, and the final row shows the sorted array. Fill in the values for the two intermediate rows showing the steps of the merge process.
Starting array:
| 14 | 5 | 23 | 11 | 19 | 8 | 17 | 3 |
|---|
Row 2 (after merging sublists of size 1):
Row 3 (after merging sublists of size 2):
Final sorted array:
| 3 | 5 | 8 | 11 | 14 | 17 | 19 | 23 |
|---|
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.