Question

Give the time complexities (Big-O notation) of the following running times expressed as a function of...

Give the time complexities (Big-O notation) of the following running times expressed as a function of the input size N.

a) N12+ 25N10+ 8

b) N + 3logN + 12n√n

c) 12NlogN + 15N2 logN

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Big - O notation is used to give the time complexity of a function. It describes the worst case scenario on the running time of a program.

(a)

n12 + 25n10 + 8

Here the n12 term grows faster than  25n10 for large inputs.

So time complexity is O(n12) .

(b)

n + 3logn + 12n√n

Here the 12n√n term grows faster than both  3logn and n  for large inputs.

So time complexity is O(n√n) .

(c)

12nlogn + 15n2 logn

Here the 15n2 logn term grows faster than 12nlogn for large inputs.

So time complexity is O(n2 logn) .

Note that the time complexity notation subsumes any multiplied constant terms

Add a comment
Know the answer?
Add Answer to:
Give the time complexities (Big-O notation) of the following running times expressed as a function of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT