While I was studying time complexity, I found a web page explaining about Big O notation.
While I was reading I found the example they used and it got me confused.
In the example they said something like
2n^{2} = O(n^{3})
because for all n bigger than 2(n_{0})
, there exists a c(which is 1) that satisfies 0 <= 2n^{2} <= cn^{3}
First I thought the Big O should be O(n^2)
. But after reading through few more texts I can see that n^2
is smaller than n^3
so can theoretically say that the big O is O(n^3)
.
But is O(n^2)
wrong for the example above?