-4
$\begingroup$

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.

$\endgroup$

1 Answer 1

1
$\begingroup$

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.

$\endgroup$
2
  • $\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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.