NEW
Font size
S
M
L
XL
WorksheetsSearching & Sorting Algorithms
Total questions: 16
Worksheet time: 16mins
Name
Class
Date
1.
What does a searching algorithm do?
a)
Search through a set of data
b)
Save a set of data
c)
Help to organise data
2.
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
3.
Which of these is NOT a Sort algorithm
a)
Binary
b)
Merge
c)
Bubble
d)
Insertion
4.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
5.
What is a binary search?
a)
Each item is checked in order
b)
The list is split into 2 and compared
c)
The first 2 values are compared and moved
d)
Nothing happens
6.
Which type of lists are linear search algorithms used for?
a)
Unsorted lists
b)
Sorted lists
7.
A binary search algorithm will only work on a list which is in order. True or False
a)
True
b)
False
8.
Which one of the following is an advantage of a linear search?
a)
It takes a long time to find the item.
b)
It is a simple algorithm to write.
c)
It is more efficient than a binary search.
d)
It is a complex algorithm to write.
9.
Using a binary search why will the number 9 never be found in the following list:
11, 8, 13, 9, 7, 3
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
10.
A linear search is to be performed on the list:
12, 6, 8, 1, 3
How many searches would it take to find the number 1?
12, 6, 8, 1, 3
How many searches would it take to find the number 1?
a)
1
b)
2
c)
3
d)
4
11.
Which type of sort algorithm is this?
a)
Insertion
b)
Merge
c)
Bubble
12.
What is the flag for in the flowchart?
a)
To flag whether there has been a swap on the current pass.
b)
To make it look bright and colourful.
c)
To identify the swapped pair of numbers.
13.
When data is in a random order, which sorting algorithm is faster?
a)
Insertion
b)
Bubble
14.
Which sorting algorithm places each number into the right place one after the other until all are in the right place.
a)
Insertion
b)
Bubble
15.
Which type of search algorithm is this?
a)
Binary
b)
Linear
16.
Which type of search algorithm is this?
a)
Binary
b)
Linear
Reset
