
42. AQA GCSE (8525) SLR7 – 3.1 Binary search
Authored by James Cole
Computers
11th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first step in a binary search algorithm?
Sort the dataset in ascending order.
Calculate the midpoint of the dataset.
Divide the dataset into two halves.
Compare the first item with the search item.
Answer explanation
The first step in a binary search algorithm is to calculate the midpoint of the dataset, not to sort, divide, or compare items.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What condition must be met for a binary search to work?
The dataset must be divided into two equal halves.
The dataset must have an even number of items.
The dataset must be in order of a key field.
The dataset must contain unique items.
Answer explanation
Binary search requires the dataset to be in order of a key field to work efficiently by comparing the target value with the middle element.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does a binary search compare to a linear search in terms of efficiency?
A linear search is more efficient on large datasets.
A binary search is more efficient on average.
There is no difference in efficiency.
A binary search is always faster.
Answer explanation
A binary search is more efficient on average.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the item you are looking for is lower than the item at the midpoint in a binary search?
The dataset is re-sorted.
Repeat the process on the right half of the dataset.
The search is terminated.
Repeat the process on the left half of the dataset.
Answer explanation
If the item you are looking for is lower than the item at the midpoint in a binary search, you should repeat the process on the left half of the dataset to continue narrowing down the search.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of division is used to calculate the midpoint in a binary search?
Exponential division
Modular division
Floating-point division
Integer division
Answer explanation
Integer division is used to calculate the midpoint in a binary search by dividing the sum of the low and high indices by 2, resulting in a whole number without decimals.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when the left and right pointers are the same value in a binary search?
The search algorithm restarts.
The dataset is re-sorted.
A new midpoint is calculated.
The item is either found at the pointer or not in the list.
Answer explanation
When the left and right pointers are the same value in a binary search, the item is either found at the pointer or not in the list.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many checks would a linear search have performed in the provided example with a dataset of eight items?
3 checks
4 checks
8 checks
5 checks
Answer explanation
A linear search checks each item in the dataset one by one until finding the target. With 8 items, it would perform 5 checks to find the target.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?