How can I show that if $d(n)$ is $O(f(n))$ and $e(n)$ is $O(g(n))$, then $d(n) - e(n)$ is not necessarily $O(f(n) - g(n))$.
Could someone explain it please?
How can I show that if $d(n)$ is $O(f(n))$ and $e(n)$ is $O(g(n))$, then $d(n) - e(n)$ is not necessarily $O(f(n) - g(n))$.
Could someone explain it please?
Note that $2f(n)$ is $O(f(n))$ for any function $f$. Also, $f(n)$ is $O(f(n))$ as well.
If what you're saying was true, then $f(n)$ would be $O(0)$ for any function, which is very far from being true.