Year 9, Unit 1
Lesson 5
Worksheet 2
Writing a linear search algorithm
The problem:
You have lost your house keys at home. Write a search algorithm for looking for your keys. Test it
works.
Step 1
List all the places at
home where you could
have left your keys.
Step 2
Abstract the problem.
(What is relevant?
What is irrelevant?)
© Pearson Education Ltd 2019. Copying permitted for purchasing institution only. This material is not copyright
free.
Step 3
Write your algorithm.
© Pearson Education Ltd 2019. Copying permitted for purchasing institution only. This material is not copyright
free.