For example. O(n(n+1)) Would this simply simplify to n^2 Because n^2+n you would drop the n
Also 2000n^2 Would simply be n^2
Also 0.001n^3 would simply be n^3
Is this correct?
For example. O(n(n+1)) Would this simply simplify to n^2 Because n^2+n you would drop the n
Also 2000n^2 Would simply be n^2
Also 0.001n^3 would simply be n^3
Is this correct?
O(n(n+1))
would simplify to O(n^2)
because n(n+1)
is less than or equal to a constant factor of n^2
, for sufficiently large n:
n(n + 1) <= n^2 + n <= n^2 + n^2 <= 2n^2
The other simplifications are correct, because you're just removing a constant factor.
Basically, you can remove a constant factor, and any slower growing terms from the expression.