While searching for answers relating to "Big O" notation, I have seen many SO answers such as this, this, or this, but still I have not clearly understood some points.
Why do we ignore the co-efficients?
For example this answer says that the final complexity of 2N + 2
is O(N)
; we remove the leading co-efficient 2
and the final constant 2
as well.
Removing the final constant of 2
perhaps understandable. After all, N
may be very large and so "forgetting" the final 2
may only change the grand total by a small percentage.
However I cannot clearly understand how removing the leading co-efficient does not make difference. If the leading 2
above became a 1
or a 3
, the percentage change to the grand total would be large.
Similarly, apparently 2N^3 + 99N^2 + 500
is O(N^3)
. How do we ignore the 99N^2
along with the 500
?