NEW
Font size
S
M
L
XL
WorksheetsSearch Algorithms
Total questions: 25
Worksheet time: 50mins
Name
Class
Date
1.
Identify the search algorithm
a)
Random search
b)
Binary search
c)
Denary search
d)
Next Item search
2.
Identify the description of a linear search
a)
Put the elements in order, check each item in turn
b)
Put the elements in order, compare to the middle value, split the list in order and repeat
c)
Elements do not need to be in order, check each item in turn
d)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
3.
Identify the description of a binary search
a)
Put the elements in order, check each item in turn
b)
Put the elements in order, compare to the middle value, split the list in order and repeat
c)
Elements do not need to be in order, check each item in turn
d)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
4.
Which of the following is not a component of computational thinking?
a)
Abstraction
b)
Typing
c)
Decomposition
d)
Algorithmic thinking
5.
Define the term abstraction within computational thinking
a)
Adding together numbers
b)
Taking a real world problem and designing a computer program that exactly replicates every part of that problem in the computer
c)
Performing multiple calculations on a list of variables
d)
Representing real world problems in a computer program, using symbols and removing unnecessary elements
6.
Identify the correct definition for 'algorithm'
a)
A problem
b)
A solution to a problem
c)
The steps that are taken to solve a problem
d)
The words to enter when typing
7.
Which of these is a type of searching algorithm?
a)
Linear search
b)
Word search
c)
Search engine
8.
What is an advantage of a linear search?
a)
It is very quick
b)
It only works with ordered lists
c)
It is a simple algorithm
9.
What is an advantage of a binary search
a)
It's very quick
b)
It only works with ordered lists
c)
It is a simple algorithm
10.
What is the biggest disadvantage of a binary search?
a)
It is slow
b)
It can only be used if the data is sorted into an order
c)
It takes the data and keeps dividing it in half until it finds the item it is looking for
11.
As the data set grows in size, linear search becomes more efficient than binary search.
a)
True
b)
False
12.
What is the maximum number of comparisons a linear search algorithm could make while searching a 100 item list?
a)
50
b)
51
c)
100
d)
101
13.
How many comparisons would it take to find the value 7 in the following list using a linear search?
[1, 4, 7, 8, 5, 2, 9]
[1, 4, 7, 8, 5, 2, 9]
a)
3
b)
4
c)
2
d)
Not possible, list is out of order
14.
How many comparisons would it take to find the value 2 in the following list using a binary search?
[1, 4, 7, 8, 5, 2, 9]
[1, 4, 7, 8, 5, 2, 9]
a)
3
b)
2
c)
6
d)
Not possible, list is out of order
15.
How many comparisons would it take to find the value 2 in the following list using a binary search?
[1, 2, 4, 5, 7, 8, 9]
[1, 2, 4, 5, 7, 8, 9]
a)
1
b)
2
c)
3
d)
4
16.
What is decomposition?
a)
Breaking down of soil
b)
Breaking down of a problem into smaller chunks
c)
Making a problem a bigger deal
d)
Breaking smaller chunks of problems into one large problem
17.
Linear Search is faster than Binary search
a)
TRUE
b)
FALSE
c)
It depends on the scenario
18.
Where can Linear Search be performed?
a)
On letters
b)
On numbers
c)
Both
d)
None of these
19.
Which values can Binary Search be performed on?
a)
Letters
b)
Numbers
c)
Ordered Numbers
d)
Ordered Letters
20.
On average, which searching algorithm is more efficient?
a)
Binary Search
b)
Linear Search
21.
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
22.
A binary search is to be performed on the list:
3 5 9 10 23
How many comparisons would it take to find number 9?
3 5 9 10 23
How many comparisons would it take to find number 9?
a)
0-1
b)
2-3
c)
4-5
d)
I can't find the number 9
23.
A binary search is to be performed on the list:
1 5 10 13 48 68 100 101
How many comparisons would it take to find number 101?
1 5 10 13 48 68 100 101
How many comparisons would it take to find number 101?
a)
0-1
b)
1-2
c)
3-4
d)
4-5
24.
Describe a disadvantage of a linear search algorithm
a)
Data does not need to be in order.
b)
Performs well over large ordered lists.
c)
Can only work on an ordered list. If unordered must use a linear search.
d)
Slow with large data sets.
25.
Describe a disadvantage of a binary search algorithm
a)
If the criteria matches the last item in list, entire list has to be checked.
b)
Simple to code than a binary search.
c)
Quicker than a linear search.
d)
More complicated to code than a linear search.
Reset
