Why is O(f(n)) − O(f(n)) not equal to 0? Full disclosure this is a question from practice problems for my theory class.
1 Answer
$\begingroup$
$\endgroup$
2
This platform is not a place to get your homework solved by the kind people on the internet. Just keep that in mind for your future posts.
Getting down to the question, I'll leave you with a small hint. Big-O of f(n) denotes a class of functions that have a higher rate of growth than f(n) after a certain point. Hence, O(n^2) includes n, nlogn, n^2 and many more! It should be easy for you to get to the solution now.
-
$\begingroup$ $O(n^2)$ does not contain $n^3$. $\endgroup$ Sep 14, 2020 at 18:29
-
$\begingroup$ @ChristianKomusiewicz thanks for pointing it out. It was a stupid mistake on my part. $\endgroup$ Sep 14, 2020 at 18:32