How does a binary search algorithm work?
Search Algorithm Recap

Quiz
•
Computers
•
11th Grade
•
Medium
Mr McCallion
Used 1+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
by randomly selecting elements from the search space until the target element is found or the search space is empty.
by comparing each element in the search space with the target element until a match is found or the search space is empty.
by repeatedly dividing the search space in half until the target element is found or the search space is empty.
by comparing the last element of the list first and then moving towards the desired element
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How does a linear search algorithm work?
by randomly selecting elements from the search space until the target element is found or the search space is empty.
by comparing each element in the search space with the target element until a match is found or the search space is empty.
by repeatedly dividing the search space in half until the target element is found or the search space is empty.
by comparing the last element of the list first and then moving towards the desired element
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
When should you use a linear search algorithm instead of a binary search algorithm?
When the list is sorted.
When the list contains duplicate elements.
When the list is very large.
When the list is not sorted.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a binary search algorithm used for?
A binary search algorithm is used to sort an array in ascending order.
A binary search algorithm is used to find the position of a target value within a sorted array.
A binary search algorithm is used to randomly select elements from a list or array.
A binary search algorithm is used to compare each element in a list or array with the target value.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When should you use a binary search algorithm instead of a linear search algorithm?
When the list is sorted.
When the list contains duplicate elements.
When the list is very large.
When the list is not sorted.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In python we implement an array with a:
variable
list
dictionary
string
Similar Resources on Quizizz
9 questions
Linear v Binary Search Algorithms

Quiz
•
10th - 12th Grade
10 questions
The Year 9 Quiz

Quiz
•
9th - 11th Grade
10 questions
Hexadecimal Conversions

Quiz
•
11th Grade
10 questions
CS Python Fundamentals 8.8 Lesson Quiz

Quiz
•
9th - 12th Grade
10 questions
Algorithm Complexity Quiz

Quiz
•
9th - 12th Grade
10 questions
7.5 Standard Methods of Solution Cambridge IGCSE 0478

Quiz
•
10th Grade - University
9 questions
IB CS Topic 4.2

Quiz
•
11th - 12th Grade
8 questions
Binary Search

Quiz
•
7th - 11th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University