wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Searching & Sorting Algorithms

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.
What is an algorithm?
a)
A series of steps that can be followed to complete a task  
b)
A type of sort 
c)
A type of iteration  
d)
A selection  
2.
Which search algorithm is good for a few items?
a)
Linear search 
b)
Binary search
c)
Merge search 
d)
Sequence search 
3.
What happens in stage 2 of the merge sort?
a)
Each pair of sublists is repeatedly merged to produce new sorted sublists
b)
The list is successively divided in half, forming two sublists, until each sublist is of length one
c)
Adjacent numbers are swapped around 
d)
The numbers are multiplied together
4.
What can searching algorithms be used for?
a)
Software applications
b)
Games
c)
Hardware
d)
Tables
5.
Which one would be used by Google search?
a)
search algorithms 
b)
sort algorithms
c)
decomposition
d)
abstraction
6.
Which search algorithm is more efficient?
a)
binary search
b)
merge search
c)
linear search
d)
bubble search
7.
A bubble sort is used to sort the following numbers:
a)
23,34,12,7,34,65,87
b)
34,23,12,7,34,65,87
c)
34,12,7,65,23,34,87
d)
7,12,23,34,34,65,87 
8.
What would be needed if searching algorithms didn't exist?
a)
The data would need to be saved
b)
Each item of data would need to be looked at one by one, until the searched for data was found
c)
A new set of data to look at would be needed
9.
Which of these is a type of searching algorithm?
a)
Linear search
b)
Word search
c)
Search engine
10.
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
11.
Which of the following is NOT an advantage of a serial search?
a)
It can be used on any set of data regardless of type
b)
It is the quickest search to use
c)
It is a simple algorithm, so it is easy to write a computer program to carry it out
12.
What does a binary search do?
a)
Looks at the first item of data, then each one in turn, until it finds the data item requested
b)
Converts all the data into binary
c)
Takes the data and splits it in half repeatedly until it finds the data item requested
13.
Which search algorithm would be best to use with ordered data?
a)
A binary search
b)
Either binary search or a linear search
c)
A linear search
14.
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
15.
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
16.
What does a sorting algorithm do?
a)
Finds an item of data in a set of data
b)
Saves a set of data
c)
Puts a list of items into order
17.
Which of the following is not a sorting algorithm?
a)
Bubble Sort
b)
Long Sort
c)
Insertion Sort
18.
What does a bubble sort do?
a)
Sorts a list by comparing two items that are side by side, to see which is out of order
b)
Separates a list of data into different collections of data, before sorting and gathering back into a list
c)
Finds an item of data in a list
19.
How many passes will a bubble sort go through?
a)
Only one pass
b)
Two passes
c)
Several passe - until the data is fully ordered
20.
Why does a bubble sort do a final pass even when the data is in the correct order?
a)
To save the data
b)
It does not recognise that the data is in order until the final pass requires no changes
c)
It needs to do this to put the data back in to a list
21.
Which of the following is an advantage of a bubble sort?
a)
It is a very small and simple computer program
b)
It takes a very long time to run
c)
It is very quick
22.
Which of the following is NOT an advantage of a bubble sort?
a)
It is a very small and simple computer program
b)
There is only one task to perform
c)
It is very quick
23.
What does an insertion sort do?
a)
Separates a list of data into different collections of data which are sorted and gathered back into a list
b)
Goes through a list of data a number of times and compares two items that are side by side to each other to see which is out of order
c)
Goes through a list, comparing two items that are side by side, and continues to move one value until it is in the correct place.
24.
Which of the following is an advantage of a insertion sort when compared with a bubble sort?
a)
It is quicker than a bubble sort algorithm
b)
It is simpler than a bubble sort algorithm
c)
There is no advantage.
25.
How many passes will an insertion sort go through?
a)
Only one pass
b)
Two passes
c)
Several passes - until the data is fully ordered