Skip to main content

GCSE

Lesson 5 Binary search

Curriculum > KS4 > Unit > Lesson

In this lesson, learners are introduced to binary search; the second and final searching algorithm they need to know about. They will go over the steps of carrying out a binary search, and perform a binary search with playing cards and with a sample of data. Learners will be made aware that a binary search is only possible if the data is ordered, otherwise a linear search must be performed or the data must be sorted. This is a great opportunity to acknowledge one of the reasons why sorting algorithms are useful before being introduced to them in the future lessons. They should also be able to identify why it is generally a more efficient algorithm than linear search when dealing with ordered data due to it’s “divide and conquer” nature. This should be made apparent to learners when going over the cup demonstration on the slides and when carrying out a binary search of their own with cards and a data sample. One of the challenges learners can often be faced with is knowing what item to check when there is an even number of items. To make things clear without the need for a mathematical formula, the slides state that the middle-left item should be the next midpoint. In the next lesson, learners will be presented with the Python code for a binary search which uses the expression midpoint DIV 2 to clarify this middle-left choice.

Learning objectives

  • Describe how binary search is used for finding the position of an item in a list of items
  • Perform a binary search to find the position of an item in a list
  • Identify scenarios when a binary search can and cannot be carried out

Package contents

  • Lesson plans
  • Learning graphs
  • Unit overviews
  • Activities
Log in to download

Not registered yet?

Create an account and get access to over 500 hours of free teaching resources.

GCSE revision

A comprehensive range of content and helpful practice questions are also available for this topic.

Help us make these resources better

Provide your feedback

Or email us at [email protected]