Determine the function for the number of steps taken by the algorithm. (FOR EACH FUNCTION)Which Big-O set will this algorithm belong to? In other words, determine the complexity of this algorithm...


Determine the function for the number of steps taken by the algorithm. (FOR EACH FUNCTION)
Which Big-O set will this algorithm belong to? In other words, determine the complexity of this algorithm


Because n usually refers to the size of the input, you can assume it is a positive integer.


def function1(y):<br>X = y<br>y = 1<br>x = x/x<br>x = x/10<br>for i in range (int(x/2)):<br>print(

Extracted text: def function1(y): X = y y = 1 x = x/x x = x/10 for i in range (int(x/2)): print("n") def function2(y): for i in range(y): for j in range(y): X = 1 print(n) X = 2 X = 3

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here