Sorting algorithms

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637
Question 11
Medium

Explain how the merge sort algorithm works. In your explanation, refer to how it would sort the following list of integers: [85, 24, 63, 45].

You may reference the structure below to support your explanation:

A diagram showing a tree-like structure starting with a single block [85, 24, 63, 45]. Next level down shows the list split into two blocks: [85, 24] and [63, 45]. The third level down shows each value split into its own single-item block: [85], [24], [63], and [45]. The fourth level down shows these blocks merged back together in pairs of sorted values: [24, 85] and [45, 63]. The final level shows these pairs merged into a single sorted block: [24, 45, 63, 85].

[4]

Sorting algorithms Questions

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