Search Algorithms

Search Algorithms

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

sani baharom

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

60 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An algorithm is...
A set of steps to solve a problem
When you sort data into the correct order
When you search data for a specific value
Any written code

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the best description of the linear search algorithm?
Put the elements in order, then go through them one by one until target is found or the end of the list is reached.
Put the elements in order, compare with the middle value, if not the target: continue to the left or right of the middle and repeat. 
Elements do not need to be in order. Go through them one by one until target is found or the end of the list is reached.
Elements do not need to be in order, compare with the middle value, if not the target: continue to the left or right of the middle and repeat. 

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the best description of the binary search algorithm?
Put the elements in order, then go through them one by one until target is found or the end of the list is reached.
Put the elements in order, compare with the middle value, if not the target: continue to the left or right of the middle and repeat. 
Elements do not need to be in order. Go through them one by one until target is found or the end of the list is reached.
Elements do not need to be in order, compare with the middle value, if not the target: continue to the left or right of the middle and repeat. 

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

As the data set grows in size, linear search becomes more efficient than binary search. 
True
False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum number of comparisons a linear search algorithm could make while searching a 100 item list?
50
51
100
101

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the average number of comparisons for a successful linear search on a list with 100 items?
50
101
100
50.5

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the maximum number of comparisons required to find a value in a list of 20 items using a binary search?
20
5
6
21

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?