Data Structures, Algorithms, & Applications in C++
Chapter 2, Exercise 11
- (a)
-
f(n) / g(n) = 10n + 9 / n
which goes to infinity as n goes to infinity.
So, f(n) is not O(g(n)).
- (c)
-
g(n) / f(n) = log n
which goes to infinity as n goes to infinity.
So, f(n) is not Theta(g(n)).