wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

GCSE Computing - Searching & Sorting algorithms #1

Total questions: 10

Worksheet time: 9mins

Name
Class
Date
1.

What is the maximum amount of passes needed to sort 11 pieces of data?

a)

10

b)

11

c)

7

d)

5

2.
We are sorting the following list in ascending order:
 
1    4    2    9    3    8    5
 
What does the list look like after one pass of the bubble sort algorithm. 
a)
1 2 4 3 8 5 9
b)
1 4 2 5 3 8 9
c)
4 2 9 3 8 5 1
3.
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
4.
A Linear search algorithm requires data to be ordered.
a)
True
b)
False
5.
What is an advantage of the Linear search algorithm?
a)
Performs well with small sized data sets
b)
Can be used on data sets with more than a million elements
c)
Is complicated to code
6.
What is a disadvantage of the Linear search algorithm?
a)
It will only work on a sorted data set
b)
May be too slow to process large data sets
7.

The first part of a bubble sort algorithm is pictured here. Which of the following options would correctly complete the algorithm?

a)
b)
c)
d)
8.
Select the best description to explain what a linear search algorithm is.
a)
Put the elements in order, check each item in turn.
b)
Put the elements in order, compare with 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
9.

Which expression best defines bubble sort?

a)

n+1

b)

n=1

c)

n-1

d)

n/1

10.

What would the list [9, 6, 12, 7, 3, 16, 10] look like after one iteration of the Bubble sort algorithm (smallest to biggest)?

a)

[6, 9, 7, 3, 12, 10, 16]

b)

[3, 9, 6, 12, 7, 16, 10]

c)

[3, 6, 7, 9, 10, 12, 16]

d)

[9, 6, 12, 3, 7, 16, 10]