122k views
0 votes
Big-O Notation of: f(n) = n^2 + 100n + log(n) + 1000

a. O(n)
b. O(n log n)
c. O(n^2)
d. O(log n)

1 Answer

3 votes

Final answer:

The Big-O Notation of the function f(n) = n^2 + 100n + log(n) + 1000 is O(n^2), which is determined by the term with the highest growth rate, n^2, ignoring lower-order terms and constants.

Step-by-step explanation:

The Big-O Notation of the function f(n) = n^2 + 100n + log(n) + 1000 is used to describe the upper bound of the complexity of an algorithm in terms of the size of the input, n. To determine the Big-O Notation, we look for the term with the highest growth rate as n approaches infinity. In this case, the term n^2 grows faster than n, log(n), or any constant like 1000.

Therefore, we can disregard the lower-order terms and the constant, focusing only on the term with the highest growth rate, which is n^2. The Big-O Notation for f(n) = n^2 + 100n + log(n) + 1000 is O(n^2), which represents the function's time complexity as n grows large.

User Raham
by
7.9k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories