Single lesson · Key Stage 3

Insertion or merge sort, and comparing algorithms – Year 9 Computing lesson

Pupils learn to carry out an insertion sort and a merge sort on a short list and compare sorting algorithms using timing results to recommend the most efficient one.

Also in a bundle Searching and Sorting – Year 9 Computing lessons 6 lessons for £20 · save 16% on buying separately

Lesson 5 of 6 in unit 9.2 Searching and Sorting, taught in Year 9, Autumn 2. It answers one big question: Why do some sorting algorithms finish so much faster than others?

By the end, pupils can carry out an insertion sort and a merge sort on a short list and compare sorting algorithms using timing results to recommend the most efficient one.

The Build (the main task)
Compare bubble sort, insertion sort and merge sort using the timing results for 100, 1,000 and 5,000 books, and recommend one for the library catalogue, giving two reasons.
Support version
Sentence starters: one for what the results show, one for comparing two algorithms and one for the recommendation, with the key figures highlighted in the table.
Challenge
Explain why insertion sort can beat merge sort on a list that is already nearly in order.
Real-world link
Pupils time three sorts on a list of 5,000 book loan counts and recommend one for the school library catalogue.
Key words
Insertion sort, Merge sort and Efficient, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“Merge sort is finished once the list has been split into single items”; “Insertion sort works by swapping neighbouring pairs, like bubble sort”.
National Curriculum
NC2 (key algorithms (e.g. searching and sorting); compare alternative algorithms); NC3 (two or more languages, at least one textual; data structures; modular programs with procedures or functions).

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Pupils need computers for the main task.

Also sold in the Searching and Sorting unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Python sort timer program
  • Insertion or merge sort and comparing algorithms - Quiz Quiz Trade Cards
  • Python sort timer program
  • Single-teacher licence: use and adapt it with your own classes

More for KS3 Computing

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.