L2 Assessment - Time Complexity

Problem 1

Use your own words, explain what is time complexity.

Problem 2

Arrange the following time complexities from the fastest to the slowest:

Problem 3

What is the time complexity of the following program?

Problem 4

What is the time complexity of the following program?

Problem 5

What is the time complexity of the following program?

Problem 6

What is the time complexity of the following program?

Problem 7

What is the time complexity of the following program?

problem 8

What is the time complexity of the following function?

This function calculates the maximum of the three numbers

a
,
b
, and
c
.

problem 9

What is the time complexity of the following function?

This function calculates the

base
number to the power of
n
.

problem 10

What is the time complexity of the following function?

This function approximates the square root of the given number by using newton's square root approximation method.