wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OCR Search and Sorting

Total questions: 40

Worksheet time: 28mins

Name
Class
Date
1.
Compares pairs of items and swaps them if they are in the wrong order. Each pair in the list is checked.
a)
Bubble sort
b)
Insertion sort
2.
The process keeps repeating until there are no swaps in a pass.
a)
Bubble sort
b)
Insertion sort
3.
Inefficient way to sort a list.
a)
Bubble sort
b)
Insertion sort
4.
Takes each item in turn and puts it in the right place using the first item in the list as a starting point.
a)
Bubble sort
b)
Insertion sort
5.
Good for small lists.
a)
Bubble sort
b)
Insertion sort
c)
Bubble sort and insertion sort
6.

while searchIndex < _______(searchList)

What is the missing command to check how big the list is?

a)

print

b)

input

c)

len

d)

div

7.

Which algorithm splits the arrays into sub-arrays of 1 element.

a)

Binary search

b)

Linear Search

c)

Merge sort

d)

Insertions sort

e)

Bubble sort

8.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
9.
Where can Linear Search be performed?
a)
On letters
b)
On numbers
c)
Both
d)
None of these
10.
On average, which searching algorithm is more efficient?
a)
Binary Search
b)
Linear Search
11.
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
12.
A Linear search algorithm requires data to be ordered.
a)
True
b)
False
13.
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
14.

In which of the following cases, binary search algorithm is used?​

a)

To search an element in an unordered list.​

b)

To search an element in a list of few elements.

c)

To search an element in any ordered list with large number of elements.​

15.

How does a binary search algorithm works?​

a)

Dividing the list into halves until the item is matched with one in the list.​

b)

Starts with the first element and checks the next element consecutively until a match is found.

c)

​ None of the above​

16.

An array with 32 elements is input to a binary search algorithm. How many maximum number of comparisons are performed?​

a)

32

b)

16

c)

8

d)

5

17.

Complete the sentence: The lower half of the list is discarded if the value at midpoint is …………………….. item searched.​

a)

less than​

b)

greater than​

c)

equal to

18.
Which type of lists are linear search algorithms used for?
a)
Unsorted lists
b)
Sorted lists
19.
A binary search algorithm will only work on a list which is in order. True or False
a)
True
b)
False
20.
Which type of sort algorithm is this?
a)
Insertion
b)
Merge
c)
Bubble
21.
Which type of sort algorithm is this?
a)
Insertion
b)
Bubble
c)
Merge
22.

what's the next line of merge sort? no spaces, only commas

(a)  

23.

what's the subsequent line of merge sort? no spaces, only commas

(a)  

24.

during the first comparison of the final stage, the two numbers compared are 1 and _

a)

2

b)

4

c)

1

d)

3

25.

What is abstraction?

a)

The process of filtering out unnecessary detail

b)

The process of filtering out irrelevant characteristics

c)

The process of filtering out irrelevant characteristics and unnecessary detail

26.

What is decomposition?

a)

Breaking down a complex problem or system into smaller, more manageable parts

b)

Adding detail to make a problem more complex

c)

When you ignore the unnecessary detail in a problem

27.

Why do we decompose a complex problem?

a)

To make it more difficult to solve

b)

To change the problem we have

c)

To make it easier to solve

28.

Which of these is an example of decomposition?

a)

Watching a mechanic repair a bicycle

b)

Looking at different bicycles for similarities between them

c)

Finding out how a bicycle works by looking in detail at the different parts that make up the bicycle

29.

Which of these would NOT be involved in decomposing a problem?

a)

Thinking about how the problem could be divided into smaller parts

b)

Working out who could help you solve a part of the problem

c)

Adding more parts to the problem so it becomes more complex

30.

How would you describe this pattern's rule? 16, 11, 6, 1

a)

Add 5

b)

Subtract 3

c)

Subtract 5

d)

Subtract 6

31.
What is computational thinking?
a)
It allows you to break down a large / complex problem into smaller parts.
b)
It is thinking like a robot
c)
It is being able to bake a cake.
d)
It is creating a coding solution to a problem.
32.
What are the three key parts of computational thinking?
a)
Programming, flowcharts and pseudo code
b)
Abstraction, decomposition and algorithm
c)
Input, processing and output
d)
Patterns, shapes and numbers
33.
What is an algorithm?
a)
A sequence of instructions on how to solve a problem.
b)
The breaking down of a problem into smaller parts.
c)
Focusing on important parts and ignoring the irrelevant details
d)
The recipe for a cake
34.
What are the two main ways that we represent an algorithm?
a)
By drawing pictures 
b)
Using flowcharts and pseudo code
c)
Using python and small basic
d)
Using Scratch and python
35.
What is a flowchart?
a)
A visual representation of an algorithm using symbols
b)
Using 'fake code' to plan an algorithm
c)
Using a programming language to show an algorithm
d)
Uisng different types of charts to show an algorithm
36.
What does the following symbol represent in a flowchart?
a)
An input
b)
Start
c)
End
d)
A process
37.
What does the following flowchart symbol represent?
a)
A process
b)
An output
c)
A decision (choice)
d)
End
38.
What does the following flowchart symbol represent?
a)
Input / Output
b)
Start of flowchart
c)
A process
d)
End
39.
What does the following flowchart symbol represent?
a)
Process
b)
Input
c)
Start / End
d)
Sub-process
40.
What does the following flowchart symbol represent?
a)
A process
b)
Input / Output
c)
Start / End
d)
A sub-process