Skip to content
Computing · Year 10

Active learning ideas

Linear and Binary Search

Active learning turns abstract efficiency concepts into tangible experiences, letting students feel why sorting matters and how algorithm choice impacts speed. When students physically sort cards or time code runs, they connect Big O notation to real decisions instead of memorising formulas.

National Curriculum Attainment TargetsGCSE: Computing - Computational Thinking and Algorithms
25–45 minPairs → Whole Class4 activities

Activity 01

Case Study Analysis30 min · Small Groups

Card Race: Linear vs Binary Search

Provide groups with number cards to sort into ascending order. First, perform linear searches on an unsorted duplicate set, then binary on the sorted one, timing each hunt for a target number. Groups record steps taken and discuss efficiency gains.

Justify why a binary search requires data to be sorted while a linear search does not.

Facilitation TipDuring Card Race, place a large timer visible to all to create urgency and focus on step counting.

What to look forPresent students with a small, unsorted list of numbers and a target number. Ask them to trace the steps of a linear search to find the target, counting the number of comparisons made. Then, present a sorted list and ask them to trace a binary search, again counting comparisons.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 02

Case Study Analysis45 min · Pairs

Code Timing Pairs: Algorithm Duel

Pairs write simple Python or pseudocode for both algorithms, test on lists from 10 to 1000 items, and record average search times. They graph results to visualize O(n) versus O(log n) growth. Extend by swapping target positions.

Analyze the time complexity differences between linear and binary search.

Facilitation TipFor Code Timing Pairs, pre-write the starter code with print statements that output comparison counts and elapsed time to streamline data collection.

What to look forPose the question: 'Imagine you have a list of 1 million student IDs. Would you use linear search or binary search to find a specific ID? Justify your choice by explaining the time complexity difference and the impact of the data needing to be sorted for binary search.'

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 03

Case Study Analysis25 min · Whole Class

Prediction Challenge: Whole Class Demo

Display a large sorted list on the board or screen. Class predicts steps for linear and binary searches on various targets, then teacher simulates with code or animation. Vote on predictions before reveal and debrief differences.

Predict the performance impact of using a linear search on a very large, sorted dataset.

Facilitation TipIn Efficiency Tracker, provide example logs with partially completed rows so students see how to structure their observations before they collect data.

What to look forOn one side of a card, ask students to write the Big O notation for linear search and explain why it's O(n). On the other side, ask them to write the Big O notation for binary search and state the condition required for it to work.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

Activity 04

Case Study Analysis40 min · Individual

Efficiency Tracker: Individual Logs

Students implement searches in a programming environment, log times for 10 trials across dataset sizes, and create personal comparison tables. Share findings in a class gallery walk to spot patterns.

Justify why a binary search requires data to be sorted while a linear search does not.

Facilitation TipDuring Prediction Challenge, use a visualiser tool projected on the board to highlight the mid-point and target comparisons in real time.

What to look forPresent students with a small, unsorted list of numbers and a target number. Ask them to trace the steps of a linear search to find the target, counting the number of comparisons made. Then, present a sorted list and ask them to trace a binary search, again counting comparisons.

AnalyzeEvaluateCreateDecision-MakingSelf-Management
Generate Complete Lesson

A few notes on teaching this unit

Teach linear search first with unsorted data so students feel the inefficiency before adding the sorting requirement for binary search. Use pair work to reduce anxiety around tracing and counting steps, and avoid rushing to the formula—let patterns emerge from counted trials. Research shows that concrete manipulatives and timed races improve retention of algorithmic concepts more than static diagrams or lectures.

Students will confidently trace both searches step-by-step, justify algorithm choices based on list size and order, and use Big O notation to compare performance. Success looks like accurate comparisons, measured timings, and clear justifications during discussions and logs.


Watch Out for These Misconceptions

  • During Card Race: Linear vs Binary Search, some students assume binary search can start immediately on any list.

    After dealing the cards in Card Race, pause the race and ask each pair to attempt a binary search on their unsorted deck, observing failed mid-point divisions. Then have them sort the deck and repeat to make the pre-sorting need obvious.

  • During Code Timing Pairs: Algorithm Duel, students believe binary search is always faster even for tiny lists.

    In Code Timing Pairs, direct students to run trials on lists of 5 to 10 items and compare the timing and comparison counts side-by-side with linear results to reveal when overheads outweigh benefits.

  • During Prediction Challenge: Whole Class Demo, students think binary search always halves the steps exactly each time.

    In Prediction Challenge, trace multiple targets in the same sorted list and ask students to count steps for each target, showing that early and late targets require different numbers of steps despite the same average.


Methods used in this brief