subject

Give an analysis of the running time (big-oh notation) for each of the following 2 program fragments. note that the running time corresponds here to the number of times the operation sum++ is executed. sqrt is the function that returns the square root of a given number. a) sum = 0 for i in range(int(math. sqrt(n)/2)): sum+=1 for j in range(int(math. sqrt(n)/4)): sum+=1 for k in range(8+j): sum+=1 b) sum = 0 for i in range(int(math. sqrt(n)/2)): j=i for j in range(8+i): k=j for k in range(8+j): sum+=1

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:10, cbaughn11
In mathematics and computer science, a set is a collection in which order does not matter and there are no duplicates. in this problem, we are going to to define a class which wil allow us to create an object to represent a set of integers. you will write a program set. java to define the class set. each instance of the class set will be an object representing a set of integers.
Answers: 3
image
Computers and Technology, 22.06.2019 17:30, kameronstebbins
Which tab should you open to find the option for adding a header?
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, Metlife
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, jaueuxsn
Which component acts as a platform on which application software runs
Answers: 2
You know the right answer?
Give an analysis of the running time (big-oh notation) for each of the following 2 program fragments...

Questions in other subjects: