Merge Sort
Aligned to the AQA 8525 specification
- Level
- Intermediate
- Reading time
- 8 min
- Published
- 2 June 2026
- Updated
- 1 July 2026
On this page
Key takeaways
- Merge sort uses a divide-and-conquer strategy: it splits a list into smaller pieces, then merges those pieces back together in sorted order.
- The split phase does no comparisons; it only divides the list until every sub-list holds one element, which is sorted by definition and acts as the base case.
- Merging combines two already-sorted sub-lists by repeatedly taking the smaller of the two front elements, appending the rest once one sub-list is exhausted.
- Merge sort runs in O(n log n) in both best and worst cases, far faster than bubble sort's O(n squared) on large datasets.
- Merge sort needs extra memory proportional to n for its sub-lists, whereas bubble sort is in-place and uses no extra allocations.
Want more lessons like this one?
Generate lessons on anything you study. Free account, no card needed.
Key terms
- Merge sort
- A sorting algorithm that splits a list into single elements then merges them back together in sorted order.
- Divide-and-conquer
- A strategy that breaks a problem into smaller pieces, solves each, then combines the results.
- Split phase
- The stage that divides the list in half repeatedly until each sub-list holds one element, doing no comparisons.
- Merge phase
- The stage that combines pairs of sorted sub-lists into progressively larger sorted lists.
- Base case
- A single-element list, which is sorted by definition and terminates the splitting.
- In-place
- Sorting that uses only the original list with no extra memory allocations, as bubble sort does.
Frequently asked questions
Split and merge. The split phase divides the list in half repeatedly until every sub-list contains a single element, doing no comparisons. The merge phase then combines pairs of sorted sub-lists by repeatedly taking the smaller front element, until the full list is reassembled in order.
On large datasets, yes: merge sort runs in O(n log n) while bubble sort runs in O(n squared). But an optimised bubble sort with an early-exit flag runs in O(n) on an already-sorted list, so on small or nearly-sorted data it can outperform merge sort.
More. Merge sort requires extra memory proportional to n for the sub-lists created during merging. Bubble sort is in-place, using only the original list with no extra allocations, so claiming merge sort uses less memory is wrong.
Generate revision on any topic you study
Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.
Lessons on anything
Structured, level-matched lessons on any topic you study
Practice quizzes
Find out what you actually know before the exam does
Flashcard sets
Lock in key concepts with instant revision cards
Ask Aica
Stuck on something? Get a clear explanation, any time
Bubble Sort
Variables, Constants and Data Types
Related lessons
6 min