Font size
S
M
L
XL
WorksheetsAlgorithms - Time Complexity
Total questions: 10
Worksheet time: 11mins
Name
Class
Date
1.
What is meant by the time complexity of an algorithm?
a)
The amount of time required to solve a particular problem
b)
How difficult a problem is to solve
c)
How many lines of code are required to solve a problem
d)
How quickly a solution can be developed
2.
What two pieces of information allow you to analyse an algorithm?
a)
Time Complexity
b)
Space Complexity
c)
Size Complexity
d)
Complex Complexity
e)
Simplicity Complex
3.
What is space complexity?
a)
The space complexity is the amount of storage space an algorithm takes up
b)
How many times a certain number (base) is multiplied together to reach another number.
c)
An algorithm is a series of steps that complete a task
4.
a)
O(n)
b)
O(m)
c)
O(n+m)
d)
O(n*m)
5.
If for an algorithm time complexity is given by O(1) then complexityof it is:
a)
constant
b)
polynomial
c)
exponential
d)
none of the mentioned
6.
If for an algorithm time complexity is given by O(n) then complexityof it is:
a)
A. constant
b)
B. linear
c)
C. exponential
d)
D. none of the mentioned
7.
What is the time complexity of this algorithm?
a)
O(n)
b)
O(2n)
c)
O(log n)
d)
O(n2)
e)
O(1)
8.
What is the time complexity of this algorithm?
a)
O(n)
b)
O(2n)
c)
O(log n)
d)
O(n2)
e)
O(1)
9.
Why is this not a sequence?
Start car
Put in key
Turn key
Drive away
a)
There are spelling mistakes
b)
The instructions are in the correct order
c)
The instructions are in the wrong order
d)
It is a sequence
10.
Which algorithm, will NOT take you from A to B
a)
UP 1
RIGHT 5
UP 2
b)
RIGHT 1
UP 3
RIGHT 4
c)
UP 2
RIGHT 5
UP 1
d)
LEFT 1
UP 3
RIGHT 5
Reset
