wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Search Algorithms

Total questions: 9

Worksheet time: 4mins

Name
Class
Date
1.
Linear Search is faster than Binary search
a)
TRUE
b)
FALSE
c)
It depends on the scenario
2.
Where can Linear Search be performed?
a)
On letters
b)
On numbers
c)
Both
d)
None of these
3.
Which values can Binary Search be performed on?
a)
Letters
b)
Numbers
c)
Ordered Numbers
d)
Ordered Letters
4.
On average, which searching algorithm is more efficient?
a)
Binary Search
b)
Linear Search
5.
How many linear searches will it take to find the value 7 in the list [1,4,8,7,10,28]?
a)
2
b)
3
c)
4
d)
5
6.
Bubble sort takes the first two values of a list, and swaps them if wrong?
a)
True
b)
False
7.
How many binary searches will it take to find the value 7 in the list [1,4,7,8,10,28]?
a)
0
b)
1
c)
2
d)
3
8.
How many binary searches will it take to find the value 10 in the list [1,4,9,10,11]?
a)
0
b)
1
c)
2
d)
3
9.
Which of the following is the best description of the linear search algorithm?
a)
Put the elements in order, then go through them one by one until target is found or the end of the list is reached.
b)
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. 
c)
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.
d)
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.