4 ms·
You shouldn't have been downvoted for that, it's a perfectly reasonable question. I had the same question myself. Here's the funny part: there is no such thing
by Stratoscope 8y ago
You shouldn't have been downvoted for that, it's a perfectly reasonable question. I had the same question myself.
Here's the funny part: there is no such thing as O(10,000) in big O notation. Big O doesn't concern itself with constant factors, it's about how performance changes with the size of the dataset. If two algorithms run in constant time but one takes twice as long as the other (maybe it's a debug build), they aren't O(1) and O(2), they are both O(1).
So it's not surprising that anyone would be confused by O(10,000). In big O, this would be an impossible value. It just wouldn't make sense.
The best solution, as always, is to use plain English. You will never go wrong by saying "about 10,000".
- palunon 8y agoFormally, the Landeau notation allows for O(10,000)... But 1 = O(10,000) and 10,000 = O(1), so there is relatively little use for writing anything other than O(1).