
42. AQA GCSE (8525) SLR7 – 3.1 Binary search

Quiz
•
Computers
•
11th Grade
•
Hard

James Cole
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Algorithms Review

Quiz
•
9th - 12th Grade
10 questions
Binary conversion

Quiz
•
7th - 12th Grade
13 questions
Robust Programming

Quiz
•
11th - 12th Grade
10 questions
Data Representation - Character Sets

Quiz
•
2nd - 12th Grade
16 questions
Boolean and Search Operators

Quiz
•
9th - 12th Grade
10 questions
Nearest Neighbor Algorithm

Quiz
•
11th Grade
20 questions
CSP Unit 6: Algorithms

Quiz
•
9th - 12th Grade
11 questions
42. Algorithm - Binary Search Quiz

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade