Homeschool Guide: These lesson plans are a guide for parents. Content may contain errors — always cross-reference with official exam board specifications.

sorting algorithms

FoundationHigherAll Boards

4 detailed 50-minute lessons with teaching scripts, worked examples, parent guides, and assessment criteria.

Fastmail

Lesson Overview

Total Lessons: 4
Tier: Foundation and Higher
Duration: 50 minutes per lesson (200 minutes total)
Exam Boards: AQA, Edexcel, OCR, Eduqas, CCEA

Learning Objectives

Prerequisites

Materials & Equipment

Lesson 1: Introduction: sorting algorithms

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Write down everything you already know about sorting algorithms. Then check against the key terms: Bubble sort, Merge sort, GCSE Computer Science Exam Tips. Use a mini-whiteboard or paper.

Main Content (35 minutes)

Parent/Teacher Guide:
Before lesson: Read the script below. Pre-teach key vocab: Bubble sort, Merge sort, GCSE Computer Science Exam Tips.
If stuck: Re-read the revision notes (link above), then break the content into smaller steps.
Extension: See the Stretch & Challenge ideas in Lesson 4.
Teaching Script (35 mins):
Mins 0-5 - Hook: "Today: sorting algorithms. By the end you will be able to answer exam questions on it unaided. It connects to the rest of Computer Science because the ideas here recur across the spec."
Mins 5-20 - Direct Instruction: Work through the core ideas below one at a time; after each, ask your student to explain it back in their own words.
Mins 20-30 - Guided Practice: Model the worked example together, then let your student attempt the first practice question with guidance.
Mins 30-35 - Independent Practice: 2-3 practice questions from Lesson 3 below, with immediate feedback.
First Look

Start with the revision notes summary, then attempt: Show the state of the list [4, 2, 7, 1] after each pass of bubble sort.

Plenary (5 minutes)

Check Out

Your student states one thing they learned and one question they still have about sorting algorithms.

Lesson 2: Core Concepts: sorting algorithms

Duration: 50 minutes

Starter Activity (5 minutes)

Review Previous Lesson

Quick recap: write 3 key points from Lesson 1 on sorting algorithms. Check them against the notes below.

Main Content (35 minutes)

Definition: A sorting algorithm arranges the elements of a list into a particular order (usually ascending or descending). Sorting makes data easier to search, read, and process.
Bubble sort: works by repeatedly stepping through the list, comparing each pair of adjacent items, and swapping them if they are in the wrong order. After each pass, the largest unsorted element "bubbles up" to its correct position at the end of the list.
Merge sort: uses a "divide and conquer" approach. It splits the list into individual elements, then repeatedly merges pairs of sorted sublists until the whole list is recombined in order.
GCSE Computer Science Exam Tips: When comparing sorting algorithms, always give the time complexity of each and explain what it means for the given dataset size. Mention trade-offs: bubble sort is simple and in-place but slow; merge sort is fast but uses extra memory. For bubble sort questions, describe how each pass works and that n-1 passes are needed. Show the comparison count for a specific n to illustrate efficiency differences.
TermMeaningExample
15, 35 > 3 → Swap
25, 85 < 8 → No swap
38, 18 > 1 → Swap
48, 28 > 2 → Swap
13, 53 < 5 → No swap
25, 15 > 1 → Swap
35, 25 > 2 → Swap
13, 13 > 1 → Swap

Practice (10 minutes)

Q: Show the state of the list [4, 2, 7, 1] after each pass of bubble sort.

Answer: Pass 1: Compare 4,2 → swap → [2,4,7,1]. Compare 4,7 → no swap. Compare 7,1 → swap → [2,4,1,7]. Pass 2: Compare 2,4 → no swap. Compare 4,1 → swap → [2,1,4,7]. Pass 3: Compare 2,1 → swap → [1,2,4,7]. Pass 4: No swaps → sorted.

Plenary (5 minutes)

Explain Back

Your student teaches the key points back to you without looking. Fill any gaps immediately.

Lesson 3: Application: sorting algorithms

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Recall the key terms: Bubble sort, Merge sort, GCSE Computer Science Exam Tips. Define each in one sentence.

Main Content (35 minutes)

Parent/Teacher Guide: Let your student attempt each question alone first, then compare with the model answer. Award method marks for correct working even if the final answer is wrong.

Q1: Show the state of the list [4, 2, 7, 1] after each pass of bubble sort.

Answer: Pass 1: Compare 4,2 → swap → [2,4,7,1]. Compare 4,7 → no swap. Compare 7,1 → swap → [2,4,1,7]. Pass 2: Compare 2,4 → no swap. Compare 4,1 → swap → [2,1,4,7]. Pass 3: Compare 2,1 → swap → [1,2,4,7]. Pass 4: No swaps → sorted.

Q2: Describe the two phases of merge sort.

Answer: Phase 1 (Divide): Split the list recursively into smaller sublists until each sublist contains one element. Phase 2 (Merge): Repeatedly merge pairs of sorted sublists by comparing the first elements and building new sorted lists.

Q3: Why is merge sort more efficient than bubble sort for large datasets?

Answer: Merge sort has O(n log n) time complexity while bubble sort has O(n²). As n grows large, n² grows much faster than n log n, so bubble sort becomes extremely slow while merge sort remains relatively efficient.

Q4: Give one advantage of bubble sort over merge sort.

Answer: Bubble sort uses O(1) memory (sorts in place) while merge sort needs O(n) extra memory. Bubble sort is also simpler to implement and understand.

Q5: How many comparisons would bubble sort make in the worst case for a list of 50 items?

Answer: Worst case: n(n-1)/2 = 50 × 49 / 2 = 1225 comparisons.

Plenary (5 minutes)

Error Review

Review any questions answered incorrectly. Identify whether the error was knowledge, method, or reading the question.

Lesson 4: Exam Practice: sorting algorithms

Duration: 50 minutes

Starter Activity (5 minutes)

Command Words

Review what these command words require: state (one point), describe (say what happens), explain (say why), compare (both sides), evaluate (judgement).

Main Content (35 minutes)

Extended Answer

Extended question: Full-Mark Response A school stores 2000 student records that need to be sorted by surname. Compare bubble sort and merge sort for this task, explaining which is more suitable and why. [5 marks] <div class="

Bubble sort has O(n²) time complexity. For 2000 records, this means up to approximately 4,000,000 comparisons in the worst case. It sorts in-place, so uses minimal extra memory. Merge sort has O(n log n) time complexity. For 2000 records, this means approximately 2000 × 11 = 22,000 comparisons, which is far fewer. However, it requires O(n) extra memory for merging. Merge sort is more suitable because 2000 records is a large dataset where the difference between O(n²) and O(n log n) is significant. The faster sorting time outweighs the extra memory cost on modern systems. Bubble sort would be impractically slow for this volume of data.

Exam Tips: Practise showing bubble sort step-by-step with a table showing each comparison and swap | For merge sort, draw the divide tree and show each merge step | Remember: bubble sort can stop early if a pass has no swaps | When comparing, always mention time complexity: O(n²) vs O(n log n) | Don't forget memory: bubble sort is in-place, merge sort needs extra space | In the exam, show ALL your working - you get marks for each step, not just the final answer
Common Errors: ✗ Thinking bubble sort is the most efficient sorting algorithm ✓ Bubble sort has O(n²) time complexity, making it inefficient for large datasets. Merge sort (O(n log n)) is more efficient for large amounts of data. ✗ Confusing the pass logic in bubble sort — thinking one pass fully sorts the list ✓ One pass of bubble sort moves the largest unsorted element to its correct position; it takes n-1 passes to fully sort a list of n elements. ✗ Believing merge sort requires no extra memory ✓ Merge sort requires additional memory to merge sub-lists (O(n) space complexity), unlike bubble sort which sorts in-place. ✗ Thinking insertion sort is always O(n²) ✓ Insertion sort is O(n²) in the worst and av
Stretch & Challenge (Grade 8-9):
  • Synoptic links: explain how sorting algorithms connects to another Computer Science topic you have studied
  • Real-world: research one real-world use or example of sorting algorithms
  • Critical: "What are the limitations of the models used in sorting algorithms?"

Plenary (5 minutes)

Assessment Criteria
  • Got it: Confident explanation + correct worked examples
  • Getting there: Main points OK, needs support with detail
  • Not yet: Confused on key concepts - re-run Lesson 2

Homework & Consolidation

Recommended Resources

🎓 Smart Lesson (Guided)