Is O(5n) = 5*O(n) ? From what I understand , O(5n) == O(n). Thus they are not equal? Please correct me if I am wrong.
You only care the asymptotic behavior of the function and if f(x)/g(x) converges to a constant the two functions are defined to belong to the same big-O class. So as 5*n / n is always 5. So O(n) = O(5*n).
As for your question: O(f(x)) is defined as the set of functions having the same asymptotic behavior as f(x) and thus 5*O(N) is not defined. There is no such thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With