wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Searching & sorting algorithms

Total questions: 21

Worksheet time: 12mins

Name
Class
Date
1.
What does a linear search do?
a)
Looks at the first item of data, then each one in turn, until it finds the data item requested
b)
Organises the data into alphabetical order
c)
Splits the data until the requested data is found
2.
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
3.
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
4.
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
5.
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
6.
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
7.
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
8.
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
9.
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
10.
Which sorting algorithm may make multiple swaps per pass?
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
11.
The following lists represent 3 passes of a sorting algorithm. Which algorithm is being used to sort the list?
 
4    5    9    6    2    7

4    5    6    2    7    9 
4    5    2    6    7    9
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
12.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
13.
Using a binary search why will the number 9 never be found in the following list:
11, 8, 13, 9, 7, 3
a)
It does not work on numbers
b)
It only works on letters
c)
The list is not in order
14.

How many searches will it take to find 10 in [1,3,5,7,10,12,15] using BINARY search?

a)

3

b)

4

c)

5

d)

6

15.

Why do we use BUBBLE SORT?

a)

To place items in ORDER

b)

To SEARCH for values in a list

16.

Which algorithm uses a divide and conquer approach?

a)

Linear Search

b)

Binary Search

17.

What is an algorithm?

a)

When a task or problem is broken down to make it easier to solve.

b)

When unnecessary detail is removed from a problem to make it easier to solve.

c)

When patterns are identified to make a problem easier to solve.

d)

When a step-by-step set of instructions are developed to form a solution to a problem.

18.
Which of these is NOT a search algorithm
a)
Binary
b)
Linear
c)
Bubble
19.

How does a merge sort work?

a)

It sorts a list by comparing neighbouring items to see which is out of order

b)

It takes one item from the list and places it in the correct place

c)

It finds an item of data in a list

d)

It divides the list into sublists and then merges pairs of sublists together to sort the data.

20.

Which sorting algorithm is described by: split a list into individual lists, then combine these, two lists at a time.

a)

Merge

b)

Bubble

c)

Insertion

d)

Binary

21.

Which type of sort algorithm is this?

a)

Bubble

b)

Selection

c)

Merge

d)

Purge