Comparing algorithms: efficiency – AQA GCSE Computer Science lesson (8525)
Pupils learn to compare linear and binary search and explain why one algorithm can be more time efficient than another.
Lesson 9 of 11 in unit 10.5 Compression, Networks and Searching, taught in Year 10, Summer 1. It answers one big question: Which algorithm should we choose, and why?
By the end, pupils can compare linear and binary search and explain why one algorithm can be more time efficient than another.
- The Build (the main task)
- Compare linear search and binary search, giving one advantage and one disadvantage of each. (4 marks) Explain why a binary search would usually find an author in the catalogue more efficiently than a linear search. (2 marks)
- Support version
- A table counting the most comparisons each search makes on lists of 8, 16, 1,000 and 4,000 items, an advantage/disadvantage grid and a sentence starter.
- Challenge
- A sorted list holds 32 titles. Compare the most comparisons a linear search and a binary search would need, and explain why the difference grows when the list doubles to 64 titles. (4 marks) Explain why a linear search may still be the better choice for a short unsorted list. (4 marks) The library searches its 4,000-author catalogue about 500 times a day. Explain why it is worth keeping the catalogue sorted. (4 marks)
- Real-world link
- Should the library sort the returns trolley before searching it?
- Key words
- Efficient, Linear search and Binary search, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “There is only one correct algorithm for each problem”; “Efficiency means the shortest code”.
- AQA 8525 specification
- 3.1.2 (efficiency of algorithms); 3.1.3 (searching algorithms: linear and binary search).
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 can do it all on paper.
Also sold in the Compression, Networks and Searching unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
More for GCSE Computer Science (AQA)
See allPupils learn to explain what data compression is and why it is used, and represent data as run length encoding frequency/data pairs.
Pupils learn to complete trace tables for algorithms in AQA pseudo-code, flowcharts and the class's language, and state an algorithm's purpose.
Pupils learn to explain how Huffman coding compresses data and read characters' codes from a Huffman tree.
Written for the specifications named. Not endorsed by or affiliated with any exam board.