AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Finding the one item

Week 5 · 1.3 Searching algorithms · 3 lessons
Answers are for parents and teachers.
1
Trace a linear search for pea in the list below. Write the positions looked at and the number of looks.
Position12345
Itemrosedaisypeatuliplily
2
A list holds 9 names. A linear search looks for a name that is NOT in the list. How many names does it look at, and what must the program show?
3
Describe how you would find a friend’s name in a printed class list with a linear search. Write the steps.
4
Give one advantage and one disadvantage of a linear search.
5
Write one reason why a search engine, a log-in screen or a library catalogue needs a searching algorithm.