New
New
Year 10
AQA

Linear search

I can explain why computers need to search data and perform a linear search to find the position of an item in a list.

New
New
Year 10
AQA

Linear search

I can explain why computers need to search data and perform a linear search to find the position of an item in a list.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Computers can quickly search through large amounts of data to find what is needed.
  2. Linear search is an algorithm that involves checking each item in a list of data one at a time.
  3. Linear search is able to find items that are in any order.
  4. The best-case scenario of a linear search is when the search item is the very first one in the list.
  5. The worst-case scenario is when the item you are looking for is the very last one in the list or it isn’t in the list.

Keywords

  • Linear search - an algorithm that searches for an item in a list of items by systematically examining each item, one after another

  • Best-case - this scenario occurs when the item you are looking for results in the smallest possible number of steps

  • Worst-case - this scenario takes place when the item you are looking for results in the greatest possible number of steps

Common misconception

A linear search can only be used on lists or sequences of numbers.

A linear search can be used on lots of different types of data, including strings.


To help you plan your year 10 computer science lesson on: Linear search, download all teaching resources for free and adapt to suit your pupils' needs...

This lesson models the use of playing cards for a linear search. It may be worth having some physical decks of cards that pupils can use to practice the searches on.
Teacher tip

Equipment

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

6 Questions

Q1.
What is an ordered list?
Correct answer: a list where items are arranged in a specific sequence
a list where items are randomly arranged
a list that cannot be changed
a list with only one item
Q2.
Which of these is an example of an unordered list?
a list of names arranged alphabetically
a timetable for classes
Correct answer: a shopping list
a list of numbers in ascending order
Q3.
How would you find a chapter in a book using the table of contents?
read the entire book
search for the chapter title in the index
Correct answer: look for the page number next to the chapter title
guess the page number
Q4.
What is the main purpose of an index in a book?
to provide a summary of the book
Correct answer: to list important topics and their page numbers
to show the titles of chapters
to give definitions of words
Q5.
Which of these would be easiest to search through?
a list of colours written in no particular order
a list of numbers written randomly
a list of names in random order
Correct answer: a list of names in alphabetical order
Q6.
How many items would you need to check to confirm that an item is not in an unordered list?
only the first item in the list
half the items in the list
Correct answer: all the items in the list
only the last item in the list

6 Questions

Q1.
What is a linear search?
an algorithm that skips every other item in a list
an algorithm that sorts a list before searching
an algorithm that only works with numbers
Correct answer: an algorithm that searches for an item by examining each item one by one
Q2.
What type of data can a linear search be used on?
only numbers
only strings
only ordered lists
Correct answer: any type of data, including numbers and strings
Q3.
Match the scenario to the concept:
Correct Answer:the item is the first in the list,best-case scenario

best-case scenario

Correct Answer:the item is not in the list,worst-case scenario

worst-case scenario

Correct Answer:a list of names in random order,unordered list

unordered list

Correct Answer:checking every item in a list,linear search

linear search

Q4.
What happens if the item being searched for is not in the list?
The linear search stops after checking a few items.
Correct answer: The linear search checks every item in the list.
The linear search skips to the last item immediately.
The linear search cannot determine this.
Q5.
What is the main advantage of a linear search?
Correct answer: It works on any type of data.
It is the fastest search algorithm.
It only works with ordered lists.
It requires fewer steps than other algorithms.
Q6.
Given the list: [apple, banana, cherry, grape, orange], how many items would need to be searched in the worst-case scenario to confirm if "fig" is in the list using a linear search?
Correct Answer: 5, five