Skip to content

Course home

Sorting algorithms

Sorting algorithms

EasyMediumHard
123456789101112131415161718192021222324252627
Question 1

An environmental scientist measures the pH level of soil samples collected at regular intervals along a transect. The eight pH values obtained, in order, are: 6.5, 4.2, 7.8, 5.1, 3.9, 8.4, 6.1, 4.8

To analyze the acidity distribution, the scientist uses a merge sort algorithm to order these values from most acidic (lowest pH) to least acidic (highest pH).

Complete the table below to show how the merge sort algorithm operates on this list of pH values.

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:

6.54.27.85.13.98.46.14.8

Row 2 (after merging sublists of size 1):

Row 3 (after merging sublists of size 2):

Final sorted array:

3.94.24.85.16.16.57.88.4
[3]
Markscheme

Sorting algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Sorting algorithms

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.

Question bank