Choosing an algorithm for a data set – OCR A Level Computer Science lesson (H446)
Students learn to justify the choice of searching and sorting algorithm for a data set, using execution time, memory and the facts of the scenario.
Lesson 13 of 15 in unit 12.4 Searching, Sorting and Recursion, taught in Year 12, Autumn 2. It answers one big question: Which algorithm should you choose for this data?
By the end, students can justify the choice of searching and sorting algorithm for a data set, using execution time, memory and the facts of the scenario.
- The Build (the main task)
- Discuss which searching and sorting algorithms Tidewave Audio should use for its catalogue search, its nightly sort of 2 million play counts and its nearly sorted weekly chart, considering execution time and memory (9 marks, levels-marked 7–9 / 4–6 / 1–3).
- Support version
- A planning grid with one row per task (data size · already sorted? · algorithm · time · memory · reason from the scenario) and a conclusion frame.
- Challenge
- Evaluate the claim that Tidewave Audio should use merge sort for every sorting task it has (12 marks, levels-marked 9–12 / 5–8 / 1–4).
- Real-world link
- Tidewave Audio's engineers must choose algorithms for three jobs before the service doubles in size.
- Key words
- Execution time, Space complexity and Justify, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “Always choose the fastest algorithm, whatever the data”; “Timing one run shows which algorithm is more efficient”.
- OCR H446 specification
- 2.3.1 (a); (b).
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.
Students can do it all on paper.
Also sold in the Searching, Sorting and Recursion unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
An independent resource written for OCR A Level Computer Science (H446). It is not endorsed by OCR or Cambridge University Press & Assessment. Programming project (NEA) lessons teach general skills on a made-up example project and give supervised time, within JCQ's rules on the help a centre may give.
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 A Level Computer Science
See allStudents learn to apply problem-solving strategies to unfamiliar Bebras tasks and explain the reasoning behind each answer.
Students learn to sit the UK Bebras Computational Thinking Challenge, managing their time and checking answers against the task's rules.
Students learn to write a linear search as a function in Python and OCR pseudocode, and state its best and worst cases.
Free sample lessonWritten for the specifications named. Not endorsed by or affiliated with any exam board.