Showing AQAChange board

Split It, Sort It, Join It

Test yourself on Merge Sort with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on Merge SortGet your flashcardsBuild my revision planTrack my progress

Split It, Sort It, Join It

Merge sort is like sorting a huge pile of exam papers with friends. You split the pile in half, then split again, until everyone holds a single paper (one paper is already sorted). Then you pair up and merge the small sorted piles into bigger sorted piles, until one sorted pile is left.

Three worked examples that sort the list 5, 3, 8, 1, 4. Bubble sort rows: after pass 1 the list is 3 5 1 4 8, after pass 2 it is 3 1 4 5 8, and after pass 3 it is 1 3 4 5 8. Merge sort divides the list into 5 3 and 8 1 4, then into 5, 3, 8 and 1 4, then into single items. It then merges 5 and 3 into 3 5, merges 1 and 4 into 1 4, merges 8 with 1 4 into 1 4 8, and merges 3 5 with 1 4 8 into 1 3 4 5 8. Insertion sort inserts 3, 8, 1 and 4 in turn, so the sorted part on the left grows until the list is 1 3 4 5 8. Sorted items are green and bold.

Bubble sort compares neighbouring items and swaps them if they are in the wrong order, then repeats the pass. Merge sort divides the list down to single items, then merges the sorted parts back together. Insertion sort inserts each item into the sorted part. On long lists bubble sort and insertion sort make many comparisons, and merge sort makes fewer. Bubble sort and merge sort are named by OCR, AQA and Edexcel. Insertion sort is named by OCR only.

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.