Understand the running order of 7 functions O(1), O(n log n), O(n), O(n2 ), O(n3 ), O(log n), O(an ). 1.2. For a given function, compute the asymptotic upper bound using “big-Oh” notation. Examples: • f(n) = 100n3 − 7n3 + 14n2 • f(n) = 100n3 − 100n3 + 7n2 • f(n) = .001n3 +100·2n • f(n) = n log n + n/5 • f(n) = n log n + n2
Understand the running order of 7 functions O(1), O(n log n), O(n), O(n2 ), O(n3 ), O(log n), O(an ).
1.2. For a given function, compute the asymptotic upper bound using “big-Oh” notation.
Examples:
• f(n) = 100n3 − 7n3 + 14n2
• f(n) = 100n3 − 100n3 + 7n2
• f(n) = .001n3 +100·2n
• f(n) = n log n + n/5
• f(n) = n log n + n2
The asymptotic upper bound of a function, often denoted using "big-Oh" notation (O()), can be defined in such a way that it describes the higher restriction of ways the characteristic's runtime or useful resource usage grows because the entered size turns into very massive. It affords a higher certainty of the worst-case performance of a set of rules or functions.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps