219k views
5 votes
Which is the lowest Complexity"

A. (n) * 2n

B. (n2) * n

C. n2

D.nlog(n)

E. 3n

User Guenther
by
5.1k points

1 Answer

4 votes

Answer:

E. 3n

Step-by-step explanation:

Of the options given, 3n represents the lowest complexity = O(3n). Since O(constant * n) is the same as O(n) this represents linear complexity.

All other given options represent a complexity higher than linear complexity.

  • (n) * 2n > O(n)
  • (n2) * n > O(n)
  • n^2 > O(n)
  • nlogn > O(n)

This is because quadratic complexity and log-linear complexity are higher than linear.

User Vit Bernatik
by
5.4k points