wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

laila comel tummy busuk

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

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]

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 type of lists are linear search algorithms used for?

a)

sorted lists

b)

unsorted lists

4.

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

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 search algorithm is this?

a)

binary

b)

linear

7.

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

8.

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)

Organizes the data into alphabetical order

c)

Splits the data until the requested data is found

9.

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.

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?

a)

1

b)

2

c)

3

d)

4

11.

Which of these is NOT a Sort algorithm


a)

Binary

b)

Merge

c)

Bubble

d)

Insertion

12.

What is the biggest disadvantage of a binary search?

a)

It can only be used if the data is sorted into an order

b)

It takes the data and keeps dividing it in half until it finds the item it is looking for

c)

It is slow

13.

What does a searching algorithm do?


a)

Search through a set of data

b)

Save a set of data

c)

Help to organise data

14.

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

15.

A binary search algorithm will only work on a list which is in order. True or False


a)

true

b)

false

16.

Which type of sort algorithm is this?


a)

bubble

b)

merge

c)

insertion

17.

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

18.

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

19.

Which type of search algorithm is this?


a)

binary

b)

linear

20.

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