Insertion sort and comparing sorts – OCR GCSE Computer Science lesson (J277)
Pupils learn to carry out an insertion sort and compare bubble, insertion and merge sort for a given list.
Lesson 6 of 11 in unit 10.6 Protocols and Sorting, taught in Year 10, Summer 2. It answers one big question: Which sorting algorithm should we choose, and why?
By the end, pupils can carry out an insertion sort and compare bubble, insertion and merge sort for a given list.
- The Build (the main task)
- Complete an insertion sort of the six player names Raj, Eve, Tom, Ali, Sam, Bea into alphabetical order, showing the list after each insert. Then compare insertion sort with merge sort for sorting the café's 2,000 season scores.
- Support version
- Part-filled insertion table (first two inserts done) and sentence starters for the comparison.
- Challenge
- Recommend a sort for a leaderboard that is already in order except for one new score, and justify it.
- Real-world link
- The café sorts its players' list, and must choose a sort for the season's 2,000 scores.
- Key words
- Insertion sort, Efficient and Compare, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “Insertion sort swaps neighbouring pairs, like bubble sort”; “Once an item is in the sorted part it never moves again”.
- OCR J277 specification
- 2.1.3 (sorting algorithms: the main steps of bubble sort, merge sort and insertion sort, applying each to a data set and recognising each from its code).
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 Protocols 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)
- Single-teacher licence: use and adapt it with your own classes
More for GCSE Computer Science (OCR)
See allPupils learn to compare wired (Ethernet) and wireless (Wi-Fi, Bluetooth) connections, recommend one for a given use, and explain why wireless data is encrypted.
Free sample lessonPupils learn to carry out a bubble sort pass by pass, showing each comparison and swap, and state when the algorithm stops.
Pupils learn to describe the purpose and format of IPv4, IPv6 and MAC addresses and explain which one stays the same when a device changes network.
Written for the specifications named. Not endorsed by or affiliated with any exam board.