Skip to main content
EnglandComputer ScienceSyllabus dot point

How do the bubble sort and merge sort algorithms put a list in order, and how do they compare?

The bubble sort and merge sort algorithms, how each puts a list into order, and how their efficiency on large lists compares.

An Eduqas GCSE Computer Science answer on the bubble sort and merge sort algorithms: how each orders a list step by step, a worked bubble-sort pass, and how their efficiency on large lists compares.

Generated by Claude Opus 4.810 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Bubble sort
  3. Merge sort
  4. When to choose each sort
  5. Try this

What this dot point is asking

Eduqas wants you to describe the bubble sort and the merge sort, explain how each puts a list in order, and compare their efficiency on large lists. The key marks are the "compare adjacent pairs and swap" idea for bubble sort, the "split and merge" idea for merge sort, and the contrast that merge sort is far faster on large lists.

Bubble sort

Merge sort

When to choose each sort

For a very small list, bubble sort is fine and is simpler to write, so the extra complexity of merge sort is not worth it. For a large list, the difference is dramatic: bubble sort's many passes make it slow, while merge sort's divide-and-merge approach keeps the number of comparisons manageable, so merge sort is the clear choice. If memory is very limited, bubble sort uses almost no extra space, whereas merge sort needs room for the parts being merged, which is one situation where bubble sort can still be preferred.

Try this

Q1. State what a bubble sort does when it compares two adjacent items that are in the wrong order. [1 mark]

  • Cue. It swaps them.

Q2. State when a bubble sort knows the list is sorted. [1 mark]

  • Cue. When a complete pass makes no swaps.

Q3. State one reason merge sort is preferred over bubble sort for a large list. [1 mark]

  • Cue. It is much faster (it splits and merges, doing far fewer comparisons than bubble sort's many passes).

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas Component 1, 20224 marksDescribe how a bubble sort puts a list of numbers into ascending order.
Show worked answer →

Go through the list comparing each pair of adjacent items (up to 2 marks): if a pair is in the wrong order (the left larger than the right), swap them. This is one pass, and the largest unsorted value moves to the end.

Repeat the passes (up to 2 marks): after each pass the next largest value is in place, so repeat until a pass makes no swaps, meaning the list is sorted.

Markers reward "compare adjacent pairs and swap if out of order" and "repeat passes until no swaps". Saying it compares the first and last items misses the adjacent-pair point.

Eduqas Component 1, 20234 marksCompare bubble sort and merge sort for sorting a very large list, giving one advantage of each.
Show worked answer →

Bubble sort advantage (up to 2): simple to understand and write, and uses little extra memory; fine for very small lists.

Merge sort advantage (up to 2): much faster on large lists because it repeatedly splits the list in half and merges sorted parts, doing far fewer comparisons than bubble sort's many passes.

To compare: bubble sort is slow on large lists (it makes many passes of adjacent swaps) but simple; merge sort is efficient on large lists (divide and merge) but more complex and uses more memory. Markers reward an advantage tied to each and the efficiency contrast.

Related dot points

Sources & how we know this