
A Level CS Binary Search
Authored by M Hirani
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first step in implementing a binary search algorithm?
Initializing variables with their starting states
Sorting the dataset
Calculating the midpoint of the dataset
Entering a while loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What must be true for a binary search to be performed?
The data set must contain string values only
The data set must be unsorted
The data set must be divided into three parts
The data set must be sorted
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the binary search algorithm do after each iteration if the item is not found?
It repeats the search on the entire dataset
It stops the search
It discards half of the dataset
It adds more data to the dataset
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which variable is used to indicate whether the item has been found in a binary search?
first
last
midpoint
found
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is the midpoint calculated in a binary search algorithm?
By dividing the dataset into equal parts
By subtracting the last index from the first
By adding the first and last index and dividing by two
By multiplying the first and last index
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the item at the midpoint is less than the item being searched for?
The search stops
The first variable is adjusted to midpoint plus one
The last variable is adjusted to midpoint plus one
The first variable is adjusted to midpoint minus one
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the condition for the while loop to continue executing in a binary search?
found equals true
first is greater than last
The dataset is fully searched
first is less than or equal to last and found equals false
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?
Similar Resources on Wayground
10 questions
Von Neumann Vs Harvard Architecture
Quiz
•
12th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
11 questions
Youtube
Quiz
•
4th Grade - University
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
15 questions
Excel
Quiz
•
10th - 12th Grade
14 questions
Pre-test: On Online searching by Innovative Teaching Ideas)
Quiz
•
6th - 12th Grade
10 questions
Scratch
Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade