You are viewing a single comment's thread. Return to all comments →
Here is the formal definition of Big-O:
f(n) = O(g(n)) means there are positive constants c and k, such that 0 ≤ f(n) ≤ cg(n) for all n ≥ k.
So,saying that there is no such thing as O(2xN) is wrong.
Although, you may say that O(N)=O(2xN).
Formally g(n) could be g(n)=2*n. Therefore it's correct to say O(2*n). And we all know, O(2*n)=O(n). Both is correct.
That's what I said