4 ms·
...an algorithm or data structure operation described as being 'O(n)' could really be 'O(n) + x' No it should not. (O(N) + x) is O(N). That is how it works,
by worik 8y ago
...an algorithm or data structure operation described as being 'O(n)' could really be 'O(n) + x'
No it should not. (O(N) + x) is O(N). That is how it works, is spoken about... What it means!
It is a very simple minded article, and IMO misleading, but it is better than "(O(N) + x) is bigger than O(N)". In the sense of order analysis, it is not.
- roel_v 8y agoWell yes, that's what I said, although I guess I could have used 'n + x operations' to keep it consistent with the article and still in line with the formal definition.
- enedil 8y agoYeah, you really could have. It also grinds me when people will say "it's O(n), not O(n^(3/2))", because the former is a subset of later, not to mention talking about worst case/average case/best case. Big O notation has nothing to do with probabilities, literally nothing.