Sorting algorithms

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637
Question 15
Medium

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:

  • Bubble sort
  • Merge sort
[8]

Sorting algorithms Questions

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