Year 10
Lesson details
Key learning points
- In this lesson, we will be introduced to binary search: the second searching algorithm we need to know about. We 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.
Licence
This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.
Loading...
4 Questions
Q1.
What card would you need to search for, for the best-case scenario to occur?
10
7
8
9
Q2.
What card would you need to search for, for the worst-case scenario to occur?
10
6
7
9
Q3.
How many comparisons would it take to work out that a card wasn’t in the set of cards?
10
6
7
9
Q4.
When carrying out the linear search, does the data need to be ordered?
Yes
4 Questions
Q1.
When carrying out the binary search, does the data need to be ordered?
No
Q2.
With each comparison, the binary search algorithm eliminates how of the data.
All
Quater
Q3.
If the midpoint item is less than than the search item, do you change the range to focus on the items after or before the midpoint
Before
Q4.
When finding the item in the middle of the range (the midpoint item). If there is an even number of items, which item do you select?
The middle-right item