Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Choose the correct frequency for every line as well as the total O of the following code: int sum = 0 ; for ( int

Choose the correct frequency for every line as well as the total O of the following code:
int sum =0;
for (int j=n-1;jn-1-i;j--=i+jni=0;i
QUESTION 2
Line 2 :
A)2n+2
B)n2+1
C)log(n+1)
D)nn+32
E) None
QUESTION 3
Line 3 :
A)n2n2+12
B)2n2n2+22
C)n2+n2n2+12
D)nn+12
E) None
QUESTION 4
Line 4 & 5:
A)n(n2+1)
B)n2n2+12
C)2nn2-12
D)nn-12
E) None
QUESTION 5
Total O :
A)nlogn
B)n2
C)n3
D)n4
E) None
QUESTION 6
Question 2 :
Choose the most appropriate answer:
log(nn)+nn+2n is O():
A)2n
B)nn
C)n!
D)nlogn
E) None
QUESTION 7
2.(n42log(n))+nlog(n100) is O():
A)n2logn
B)n2
C)nlogn
D)n3
E) None
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

ISBN: 0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago