wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Big O Notation Revision

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

What does the Big O notation O(1) signify about an algorithm's performance?

a)

The algorithm's performance improves as the data set increases.

b)

The algorithm's performance declines as the data set increases.

c)

The algorithm executes in the same time regardless of the size of the data set.

d)

The algorithm's performance is proportional to the square of the size of the data set.

2.

Which Big O notation describes an algorithm that halves the data set in each pass?

a)

O(n)

b)

O(log n)

c)

O(n2)

d)

O(2n)

3.

What type of algorithmic complexity is described by O(N^2)?

a)

Constant

b)

Logarithmic

c)

Linear

d)

Polynomial

4.

Which example use is associated with the Big O notation O(N)?

a)

Binary search

b)

Hashing algorithm

c)

Linear search

d)

Quick sort

5.

What is the Big O notation for an algorithm that becomes less efficient with each addition to the data set, doubling its processing time?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(2n)

6.

What is the average time complexity of a binary search on an array?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n2)

7.

What is the worst-case space complexity of Merge Sort?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n log n)

8.

Which searching algorithm has a best case time complexity of O(1)?

a)

Linear search

b)

Binary search tree

c)

Hashing

d)

Breadth/Depth first of graph

9.

What is the best case time complexity for Quick Sort?

a)

O(n)

b)

O(n2)

c)

O(log n)

d)

O(n log n)

10.

Which algorithm has a worst-case time complexity of O(n log n)?

a)

Merge Sort

b)

Quick Sort

c)

Insertion Sort

d)

Bubble Sort

11.

What is the time complexity of finding an element in an unsorted linked list?

a)

O(1)

b)

O(log n)

c)

O(n)

d)

O(n2)

12.

Which algorithm is typically used for sorting when the data set is very large?

a)

Insertion Sort

b)

Bubble Sort

c)

Merge Sort

d)

Selection Sort