2 ms·
Sure, there are even more caveats. I should note though that big-O is not technically an upper bound on program execution time (worse case scenario), you can u
by tsimionescu 3y ago
Sure, there are even more caveats.
I should note though that big-O is not technically an upper bound on program execution time (worse case scenario), you can use big-O to refer to the best case scenario or the average case. Big-O is a notation for fhe upper bound of a function in general (e.g. f(x) = x^2 + 70x + 9 is in O(x^2)).
I think it's reasonable in this kind of case to assume we are speaking about the average-case complexity, though it's true that many think of worse case, taking the upper bound of the upper bound of the number of execution steps.