Give the big-Oh notation of the following expression:
1000 + 1000000*n + 5*n^2
The big -Oh notation of the given expression is: O(n2)
Explanation:
Big o notation provides a tight upper bound and it is a mathematical notation to represent the behavior of a given function.
This notation tells about how long the given source code or algorithm takes to run and used for algorithm analysis.
The given expression is:
= 1000 + 1000000*n + 5*n^2
The given function is a sum of three terms.
The third term has the highest growth and this term is a product of 5 and n2. The first factor doesn't depend upon the n.
So, the big -Oh notation of the given expression is: O(n2)
Get Answers For Free
Most questions answered within 1 hours.