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

Halve and find

Week 10 · 1.7 Searching algorithms · 3 lessons
Answers are for parents and teachers.
1
Put these in ascending order: 205, 18, 96, 7, 150. Then put the words kiwi, date, plum, cherry, banana in descending alphabetical order.
2
The sorted list is 12, 20, 28, 35, 41, 50, 62, 70, 85. Use a binary search to find 62. Write the centre item at each check and the number of comparisons.
3
Use the same list to look for 30. Is it found? Write each centre item and the result.
4
A friend says: ‘I will use a binary search on my list 14, 3, 9, 22, 6, because it is the fastest.’ Explain what your friend must do first, and why.
5
Explain in your own words why the search is called a binary search. Give an example of two choices at each step.