Question bank › GCSE Computer Science › Fundamentals of algorithms

Sorting algorithms: bubble & merge sort

Answer on paper first, then reveal the mark scheme one mark at a time.

1Grade 4–54 marks

A bubble sort is used to put this list into ascending order:

[7, 3, 9, 1, 5]

(a) Show the list after the first pass of the bubble sort. [2]

(b) State how many swaps are made during the first pass. [1]

(c) Explain how the bubble sort algorithm knows that the list is fully sorted. [1]

2Grade 6–76 marks

A merge sort is used to sort this list into ascending order:

[6, 2, 8, 4, 1, 7, 3, 5]

(a) Show the stages of the merge sort. [4]

(b) Give one advantage of a merge sort compared with a bubble sort and one advantage of a bubble sort compared with a merge sort. [2]

Still losing marks on this topic?

Book a free introductory session and we'll find exactly which step is costing you.

Book a free intro